Page MenuHomePhabricator

[Phragile] Investigate recent changes with the Conduit certificate
Closed, ResolvedPublic3 Estimated Story Points

Description

The Conduit certificate is needed in order for users to be able to create new sprints in Phragile and also for the Phragile bot to read data from the Phabricator API. There used to be a link from Phragile directly to a page where one can copy the Conduit certificate and paste it to Phragile. This link is currently broken since the settings panel was changed in a recent version of Phabricator and there seems to be no more page showing the certificate.

It is possible to use the Conduit method “conduit.getcertificate” to get the certificate of the currently logged in user.
The token parameter is not an API token. Instead it is the token from https://your-phabricator-domain.org/conduit/token/. The host paramter should be the full URL of your Phabricator installation. The response of this API call will contain the user's Conduit certificate.

This is not very user friendly. It should be investigated whether there is an easier way to get the certificate or whether there is another solution for handling the API authentication. The least thing to do is to replace the link in https://github.com/wmde/phragile/blob/master/resources/views/layouts/partials/conduit_certificate_form.blade.php#L14 with detailed instructions.

Event Timeline

Jakob_WMDE raised the priority of this task from to Needs Triage.
Jakob_WMDE updated the task description. (Show Details)
Jakob_WMDE added a project: Phragile.
Jakob_WMDE added subscribers: Jakob_WMDE, Tobi_WMDE_SW.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript
Tobi_WMDE_SW moved this task from Incoming to Backlog on the Phragile board.

Building a conduit connection with a certificate seems to be deprecated now.

The client needs to set an API token that the user gets from https://yourphabricator.org/conduit/login/
$client->setConduitToken($api_token);

Then the client can call Conduit methods as usal
$result = $client->callMethodSynchronous('project.create', $api_parameters);

To use setConduitToken we need to update the libphutil

Tobi_WMDE_SW moved this task from Work in progress to Done on the Phragile board.