Page MenuHomePhabricator

Allow creation of Conduit API Tokens for bots
Closed, ResolvedPublic

Description

Currently it's rather difficult to set up build machines to have the correct Conduit certificate because you have to do it manually. This is because "arc install-certificate" now prompts for a token, and you can't generate tokens for bots.

The settings page when editing bot users should allow the creation of Conduit API tokens so that this set up process is easier.

Revisions and Commits

Event Timeline

hach-que raised the priority of this task from to Needs Triage.
hach-que updated the task description. (Show Details)
hach-que added a project: Conduit.
hach-que added subscribers: hach-que, epriestley.

The settings page when editing bot users should allow the creation of Conduit API tokens

This should already be supported:

tokens (1×2 px, 293 KB)

Are you not seeing that, or looking somewhere else?

epriestley claimed this task.

Presuming resolved since I'm pretty sure this works properly.

hofan41 added a subscriber: hofan41.

This is not resolved because the web interface to generate api tokens does not generate cli tokens that arc install-certificate asks for.

Trying to connect to server...
LOGIN TO PHABRICATOR
Open this page in your browser and login to Phabricator if necessary:

https://phabricator/conduit/login/

Then paste the API Token on that page below.

    Paste API Token from that page: api-XXXXXXXXXXXXXXX
Usage Exception: The token "api-XXXXXXXXXXXXXXX" is not formatted correctly. Valid API tokens should begin "cli-" and be 32 characters long. Make sure you visited the correct URI and copy/pasted the token correctly.

Use --conduit-token.

arc install-certificate --conduit-token api-XXXXXXXXX

Does not work. It still prompts for an API token instead of taking in the cli parameter.

Use arc call-conduit, not arc install-certificate.

Scroll to the bottom of any API call in the web UI for an example.

I think @epriestley misunderstood what the bug report tried to address. I ran into the same problem yesterday.

You can make tokens for bots, but these tokens have the prefix "api-". When you want to register these tokens with arc install-certificate they are rejected, because the tokens there are expected to have the prefix "cli-".

There are two ways to fix it. One is to make bot tokens have prefix "cli-". The other is to let arc install-certificate accept tokens with prefix "api-".

There are multiple workarounds. One has been suggested by @epriestley. The other one is to enter the token manually in .arcrc.