Skip to main content
REST API reference

View and create OAuth 2.0 configurations

Use this API to manage OAuth 2.0 configurations within your cluster. You can retrieve the current configuration or create a new one if none exists, tailoring authentication settings to your environment's needs.

Overview

This API is used to retrieve and configure relevant information pertaining to the OAuth 2.0 configuration in the cluster. The POST request creates the OAuth 2.0 configuration if there is none present. Various responses are shown in the examples below.


Examples

Retrieving the OAuth 2.0 configuration in the cluster

The following output shows the OAuth 2.0 configuration in the cluster.


# The API:
/api/security/authentication/cluster/oauth2/clients

# The call:
curl -X GET "https://<mgmt-ip>/api/security/authentication/cluster/oauth2/clients" -H "accept: application/hal+json"

# The response:
{
 "records": [
{
  "name": "auth0"
}
 ],
 "num_records": 1
}

Creating the OAuth 2.0 configuration

The following output shows how to create the OAuth 2.0 configuration in the cluster.


= The API:

/api/security/authentication/cluster/oauth2/clients

= The call:

curl -X POST "https://+++<mgmt-ip>+++/api/security/authentication/cluster/oauth2/clients?return_records=true" -H "accept: application/hal+json" -d '{ "name": "name", "application": "http", "issuer": "https://examplelab.customer.com", "audience": "aud", "client_id": "client_id", "client_secret": "+++<CLIENT-SECRET>+++", "introspection": {"endpoint_uri": "https://examplelab.customer.com/server/endpoint", "interval": "PT1H" }, "remote_user_claim": "user_claim", "outgoing_proxy": "https://johndoe:somesecret@proxy.example.com:8080", "use_local_roles_if_present": false, "use_mutual_tls": "required" }'+++</CLIENT-SECRET>++++++</mgmt-ip>+++

= The response:

{
"job": {
  "uuid": "e45b123b-c228-11e8-aa20-0050568e36bb",
  "_links": {
    "self": {
      "href": "/api/cluster/jobs/e45b123b-c228-11e8-aa20-0050568e36bb"
    }
  }
}
}

'''