Skip to content

Create Auth Config for Gateway

Endpoint: POST /api/config/auth

Creates an authentication configuration that can be used in a gateway service.

Request body

Parameter Description Type Required/ Optional
id A unique identifier for the authentication configuration. string Required.
authenticationType The type of authentication. Supported values:
  • NONE: No authentication is enforced, and the API will be accessible to anyone.
  • API_KEY: Enforces basic authentication using an API key.
string Required.
apiKeys A unique API key for authentication. string Optional.
applicationId The unique identifier of the application, which generates an access key and JWT token. The Gateway will use this token to authenticate with the Conductor. The service using this authentication will inherit the application’s permissions.

The application must already exist in Conductor, and you can retrieve its ID using Get All Applications, and get the id field for your application.
string Required.

Response

Returns 200 OK, indicating that the auth config was created successfully.

Examples

Create a NONE type auth config for Gateway

Request

curl -X 'POST' \
  'https://<YOUR-SERVER-URL>/api/gateway/config/auth' \
  -H 'accept: application/json' \
  -H 'X-Authorization: <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{

  "applicationId": "35871d8a-81e1-4546-99ff-cc158f76cb7b",
  "authenticationType": "NONE",
  "id": "prod-auth"
}'

Response

Returns 200 OK, indicating that the auth config was created successfully.

Create an API_KEY type auth config for Gateway

Request

curl -X 'POST' \
  'https://<YOUR-SERVER-URL>/api/gateway/config/auth' \
  -H 'accept: application/json' \
  -H 'X-Authorization: <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
  "apiKeys": [
    "XXXXXXX"
  ],
  "applicationId": "default-orkes-application",
  "authenticationType": "API_KEY",
  "id": "test-env"
}'

Response

Returns 200 OK, indicating that the auth config was created successfully.