Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guides/securing-apps/mcp-authz-server.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ NOTE: The specification states that the `client_id` URL SHOULD NOT include a que
The `client-id-metadata-document` executor has the following system-wide settings that control caching and metadata size limits. These settings cannot be configured through the Admin Console. Instead, they are configured as SPI options when starting {project_name}.

* *min-cache-time*: The minimum time (in seconds) that a fetched Client ID Metadata Document is cached. Default: `300` (5 minutes).
* *max-cache-time*: The maximum time (in seconds) that a fetched Client ID Metadata Document is cached. Default: `259200` (3 days).
* *max-cache-time*: The maximum time (in seconds) that a fetched Client ID Metadata Document is cached. Default: `2592000` (30 days).
* *upper-limit-metadata-bytes*: The maximum size (in bytes) of a Client ID Metadata Document that {project_name} accepts. Default: `5000` (5 KB).

To configure these settings, use the `--spi-client-policy-executor--client-id-metadata-document--<property>=<value>` command-line option when starting {project_name}. For example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class ClientIdMetadataDocumentExecutorFactoryProviderConfig {
/**
* Default value for {@link #maxCacheTime} : 30days
*/
public static final int DEFAULT_CONFIG_MAX_CACHE_TIME = 259200; // 30days
public static final int DEFAULT_CONFIG_MAX_CACHE_TIME = 2592000; // 30days

/**
* Default value for {@link #upperLimitMetadataBytes} : 5KB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,9 @@ private void testClientIdMetadataDocumentExecutorCacheControl(String cacheContro
Map<String, String> m;
List<String> optionalScopeList;
if (expectedExpiry > 0) {
// move halfway through the expected lifetime so that a shorter actual cache time would fail the test
timeOffSet.set(expectedExpiry / 2);

// do authorization code flow again, but registered client metadata is still effective
code = loginUserAndGetCode(false);
signedJwt = createSignedRequestToken();
Expand Down Expand Up @@ -758,7 +761,7 @@ public void testClientIdMetadataDocumentExecutorCacheControl() throws Exception
updatePolicy(conditionConfig, executorConfig);

// CIMD Executor's min cache time default value: 300 sec
// CIMD Executor's max cache time default value: 259200 sec
// CIMD Executor's max cache time default value: 2592000 sec

// no Cache-Control header : cached in min cache time
testClientIdMetadataDocumentExecutorCacheControl(null, CIMD_EXECUTOR_MIN_CACHE_TIME_SEC);
Expand Down Expand Up @@ -788,8 +791,8 @@ public void testClientIdMetadataDocumentExecutorCacheControl() throws Exception
// under the min cache time : 5 -> 300
testClientIdMetadataDocumentExecutorCacheControl("max-age=5", CIMD_EXECUTOR_MIN_CACHE_TIME_SEC);

// over the max cache time : 365000 -> 259200
testClientIdMetadataDocumentExecutorCacheControl("s-maxage=365000", 259200);
// over the max cache time : 3650000 -> 2592000
testClientIdMetadataDocumentExecutorCacheControl("s-maxage=3650000", 2592000);
Comment thread
tnorimat marked this conversation as resolved.
Resolved
}

@Test
Expand Down
Loading