Skip to content

Commit

Permalink
Merge pull request #4688 from wso2/revert-4642-onboard-app-level-pvtk…
Browse files Browse the repository at this point in the history
…eyjwt-reuse-config

Revert "Update private key jwt reuse app config"
  • Loading branch information
mpmadhavig authored Jul 31, 2024
2 parents 899d93f + 34e617d commit 84d6542
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 36 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set product_name = "WSO2 Identity Server" %}
{% set product_url_format = "https://localhost:9443" %}
{% set product_url_sample = "https://localhost:9443" %}
{% include "../../../../../../includes/guides/authentication/oidc/private-key-jwt-client-auth.md" %}
{% include "../../../../../../includes/guides/authentication/oidc/private-key-jwt-client-auth.md" %}
101 changes: 101 additions & 0 deletions en/identity-server/next/docs/apis/restapis/configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,107 @@ paths:
"value": "30"
}
]'
/configs/jwt-key-validator:
get:
tags:
- Private Key JWY validation Authenticators
summary: Retrieve the tenant private key jwt authentication configuration
operationId: getPrivatKeyJWTValidationConfiguration
description: |
Retrieve the tenant private key jwt authentication configuration.
<b>Scope(Permission) required:</b> `internal_login`
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/JWTValidatorConfig'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-codeSamples:
- lang: Curl
source: |
curl -X 'GET' \
'https://localhost:9443/api/server/v1/configs/jwt-key-validator' \
-H 'accept: application/json' \
-H 'Authorization: Basic YWRtaW46YWRtaW4='
patch:
tags:
- Private Key JWY validation Authenticators
summary: Patch the tenant private key jwt authentication configuration
operationId: patchPrivatKeyJWTValidationConfiguration
description: |
Patch the tenant private key jwt authentication configuration. A JSONPatch as defined by RFC 6902.
<b>Scope(Permission) required:</b> `internal_config_update`
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JWTKeyValidatorPatchRequest'
required: true
responses:
'200':
description: Successful Response
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-codeSamples:
- lang: Curl
source: |
curl -X 'PATCH' \
'https://localhost:9443/api/server/v1/configs/jwt-key-validator' \
-H 'accept: */*' \
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
-H 'Content-Type: application/json' \
-d '[
{
"operation": "ADD",
"path": "/enableTokenReuse",
"value": false
}
]'
/configs/home-realm-identifiers:
get:
tags:
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,10 @@ Register the client application in {{ product_name }} as follows:
- [Standard-based OIDC application]({{base_path}}/guides/applications/register-standard-based-app/)
- [OIDC web application]({{base_path}}/guides/applications/register-oidc-web-app/)

{% if is_version == "7.0.0" %}

2. Go to the **Protocol** tab of the new application and configure the required grant type.

![oidc protocols]({{base_path}}/assets/img/guides/applications/oidc/oidc_protocols.png)

{% else %}

2. Go to the **Protocol** tab of the new application and configure the required grant type.

![oidc protocols]({{base_path}}/assets/img/guides/applications/oidc/oidc_protocols.png){: width="700" style="border: 0.3px solid lightgrey;"}

3. In the **Protocol** tab, go to the **Client Authentication** section and under **Client authentication method**, select **Private Key JWT** from the dropdown.

![client authentication methods]({{base_path}}/assets/img/guides/applications/oidc/client_authentication_methods.png){: width="700" style="border: 0.3px solid lightgrey;"}

{% endif %}

## Prepare the private key and public key

Generate a public key and private key for the client application. Follow the steps given below.
Expand Down Expand Up @@ -227,32 +213,14 @@ Be sure to replace the following values in the request:
</tr>
</table>

{% if is_version == "7.0.0" %}

## Reuse tokens (optional)

The `jti` (JWT ID) claim is a unique identifier included in the JWT token, which controls the reuse of the access token. By default, token reuse is disabled in {{ product_name }}. If you enable token reuse, the `jti` can be reused within its expiration period.

To enable token reuse in {{ product_name }}.

1. On the {{ product_name }} Console, go to **Login & Registration**.
1. On the Asgardeo Console, go to **Login & Registration**.
2. Under **Login Security**, click **Private Key JWT Client Authentication (OIDC)**.
3. Switch on the toggle to enable token reuse.
![configure JWT reuse]({{base_path}}/assets/img/guides/applications/oidc/private-key-jwt-config.png)

{% else %}

## Private key JWT Reuse (optional)

The `jti` (JWT ID) claim is a unique identifier included in the JWT token, which controls the reuse of the access token.

By default, Private key JWT reuse is disabled for an application which uses **Private Key JWT** as the **Client authentication method**. If you enable token reuse, the `jti` can be reused within its expiration period.

To enable Private key JWT reuse for an application in {{ product_name }},

1. Go to the **Protocol** tab of the selected application.
2. Click on the **Private Key JWT Reuse Enabled** checkbox under the **Client authentication method**.

3. Switch on the toggle to enable token reuse.

![configure JWT reuse]({{base_path}}/assets/img/guides/applications/oidc/private-key-jwt-config.png){: width="700" style="border: 0.3px solid lightgrey;"}

{% endif %}

0 comments on commit 84d6542

Please sign in to comment.