mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 06:26:42 +00:00
146 lines
6.0 KiB
Plaintext
146 lines
6.0 KiB
Plaintext
---
|
|
title: "Okta Client Secret"
|
|
description: "Learn how to automatically rotate Okta Client Secrets."
|
|
---
|
|
|
|
## Prerequisites
|
|
|
|
- Create an [Okta Connection](/integrations/app-connections/okta).
|
|
|
|
## Create an Okta Client Secret Rotation in Infisical
|
|
|
|
<Tabs>
|
|
<Tab title="Infisical UI">
|
|
1. Navigate to your Secret Manager Project's Dashboard and select **Add Secret Rotation** from the actions dropdown.
|
|
|
|

|
|
|
|
2. Select the **Okta Client Secret** option.
|
|
|
|

|
|
|
|
3. Configure the rotation behavior, then click **Next**.
|
|
|
|

|
|
|
|
- **Okta Connection** - the connection that will perform the rotation of the specified application's Client Secret.
|
|
- **Rotation Interval** - the interval, in days, that once elapsed will trigger a rotation.
|
|
- **Rotate At** - the local time of day when rotation should occur once the interval has elapsed.
|
|
- **Auto-Rotation Enabled** - whether secrets should automatically be rotated once the rotation interval has elapsed. Disable this option to manually rotate secrets or pause secret rotation.
|
|
|
|
4. Select the Okta application whose Client Secret you want to rotate. Then click **Next**.
|
|
|
|

|
|
|
|
5. Specify the secret names that the client credentials should be mapped to. Then click **Next**.
|
|
|
|

|
|
|
|
- **Client ID** - the name of the secret that the application Client ID will be mapped to.
|
|
- **Client Secret** - the name of the secret that the rotated Client Secret will be mapped to.
|
|
|
|
6. Give your rotation a name and description (optional). Then click **Next**.
|
|
|
|

|
|
|
|
- **Name** - the name of the secret rotation configuration. Must be slug-friendly.
|
|
- **Description** (optional) - a description of this rotation configuration.
|
|
|
|
7. Review your configuration, then click **Create Secret Rotation**.
|
|
|
|

|
|
|
|
8. Your **Okta Client Secret** credentials are now available for use via the mapped secrets.
|
|
|
|

|
|
</Tab>
|
|
<Tab title="API">
|
|
To create an Okta Client Secret Rotation, make an API request to the [Create Okta Client Secret Rotation](/api-reference/endpoints/secret-rotations/okta-client-secret/create) API endpoint.
|
|
|
|
You will first need the **Client ID** of the Okta application you want to rotate the secret for. This can be obtained from the applications dashboard.
|
|
|
|

|
|
|
|
### Sample request
|
|
|
|
```bash Request
|
|
curl --request POST \
|
|
--url https://us.infisical.com/api/v2/secret-rotations/okta-client-secret \
|
|
--header 'Content-Type: application/json' \
|
|
--data '{
|
|
"name": "my-okta-rotation",
|
|
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"description": "my client secret rotation",
|
|
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"environment": "dev",
|
|
"secretPath": "/",
|
|
"isAutoRotationEnabled": true,
|
|
"rotationInterval": 30,
|
|
"rotateAtUtc": {
|
|
"hours": 0,
|
|
"minutes": 0
|
|
},
|
|
"parameters": {
|
|
"clientId": "...",
|
|
},
|
|
"secretsMapping": {
|
|
"clientId": "OKTA_CLIENT_ID",
|
|
"clientSecret": "OKTA_CLIENT_SECRET"
|
|
}
|
|
}'
|
|
```
|
|
|
|
### Sample response
|
|
|
|
```bash Response
|
|
{
|
|
"secretRotation": {
|
|
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"name": "my-okta-rotation",
|
|
"description": "my client secret rotation",
|
|
"secretsMapping": {
|
|
"clientId": "OKTA_CLIENT_ID",
|
|
"clientSecret": "OKTA_CLIENT_SECRET"
|
|
},
|
|
"isAutoRotationEnabled": true,
|
|
"activeIndex": 0,
|
|
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"createdAt": "2023-11-07T05:31:56Z",
|
|
"updatedAt": "2023-11-07T05:31:56Z",
|
|
"rotationInterval": 30,
|
|
"rotationStatus": "success",
|
|
"lastRotationAttemptedAt": "2023-11-07T05:31:56Z",
|
|
"lastRotatedAt": "2023-11-07T05:31:56Z",
|
|
"lastRotationJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"nextRotationAt": "2023-11-07T05:31:56Z",
|
|
"connection": {
|
|
"app": "okta",
|
|
"name": "my-okta-connection",
|
|
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
|
|
},
|
|
"environment": {
|
|
"slug": "dev",
|
|
"name": "Development",
|
|
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
|
|
},
|
|
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"folder": {
|
|
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"path": "/"
|
|
},
|
|
"rotateAtUtc": {
|
|
"hours": 0,
|
|
"minutes": 0
|
|
},
|
|
"lastRotationMessage": null,
|
|
"type": "okta-client-secret",
|
|
"parameters": {
|
|
"clientId": "..."
|
|
}
|
|
}
|
|
}
|
|
```
|
|
</Tab>
|
|
</Tabs>
|