Admission Extension

Updated 2 years ago by Admin

You can use an admission extension to apply custom access control logic to your Drone instance. For example, we created a reference admission extension that grants system access based on organization and team membership.


You can register an admission extension by providing the following configuration parameters to the Drone server:

    Provides the endpoint used to make http requests to an admission extension.
    Provides the token used to authenticate http requests to the admission extension. This token is shared between the server and extension.

How it Works

The server makes an HTTP post to the admission extension during the login flow. The admission extension is expected to grant or deny the user access to the system, and can also (optionally) grant the user administrative access to the system.


The admission extension receives an HTTP request to authorize the user. The request body includes the User details in JSON format and the Event type. The Event differentiates between existing user logins and new user registrations.

Request Body definition:

1 class Request {
2 event: Event;
3 user: User;
4 }

1 class User {
2 id: int64;
3 login: string;
4 email: string;
5 admin: boolean;
6 }

1 enum Event {
2 login,
3 register
4 }

Example Request Body:

1 {
2 "id": 1,
3 "login": "octocat",
4 "email": "",
5 "admin": false
6 }


The admission extension should respond with one of the following:

  • 403 response code indicating the user is not authorized to login
  • 204 response code indicating the user is granted access
  • 200 response code, with a JSON encoded User object, to grant the user access and to grant or revoke administrative privileges.

Response definition:

1 class User {
2 login: string;
3 admin: boolean;
4 }

Example response:

1 {
2 "login": "octocat",
3 "admin": false
4 }


The http request is signed per the http signatures draft specification use the shared secret. The receiver should use the signature to verify the authenticity and integrity of the webhook.

Starter Project

If you are interested in creating an admission extension we recommend using our starter project as a base to jumpstart development.

How did we do?