Task Authorization
The task authorization process means giving permission to one or multiple users to execute a deployed and registered task.
Last updated
Was this helpful?
The task authorization process means giving permission to one or multiple users to execute a deployed and registered task.
Last updated
Was this helpful?
The Task Authorization process enables the Namespace Owner to grant or deny permissions to one or more users for executing deployed and registered tasks within the namespace. This permission determines who can execute the task and who will be responsible for the associated costs
The Task Requester can pass the created API key to someone else to execute the task. However, the one who registered the key will still pay for the execution: Imagine a development team consisting of several developers who need to execute the task. Each developer can have his/her own unique API key or share the same API key.
Executing the Task: The Task Requester calls the execute endpoint using the API key.
During the Public Beta, Truebit will cover the cost of the task execution. To qualify, please ensure you’re registered on our platform.
To interact with the TaskAuthorization smart contract, we created several commands within the Truebit CLI:
These commands help manage who can execute the deployed task and who will be responsible for paying for those executions.
The API_KEY allows others to execute tasks stored in the namespace while ensuring that the API_KEY registrant pays for the execution.
Granting Permission: The grants permission to the by calling the command within the Truebit CLI.
Creating an API Key: The Task Requester creates a new API key by calling the command from the Truebit CLI.
Registering the API Key: The Task Requester registers the API key by calling the command from the CLI. The person who registers the API key will be responsible for paying for the task execution, regardless of who calls the task.
Validation and Execution: The service validates that the API key has permission to execute tasks within the task namespace. If verified, the dispatcher starts the task execution workflow.
To allow an address to execute tasks stored in a namespace, the namespace owner must grant permission. This can be done by calling the command from the CLI. Only the namespace owner has the authority to grant this permission. If the namespace owner wants to revoke the previously granted permission, they should call the command from the CLI.
Any user with granted permission to a namespace can generate their own API_KEYS using the command from the CLI. The user who generates the API_KEY must register it by calling the command. The user who registers the API_KEY becomes the payer for any task execution made using that API_KEY.
If the registrant wants to deregister the API_KEY so that no one else with the API key can execute tasks, they should call the command from the CLI.
To use the API KEY to execute a task, please look at the endpoint.