From 5cda274007490f1c13b406d8646efebe7fcad092 Mon Sep 17 00:00:00 2001 From: pujavs Date: Tue, 29 Apr 2025 22:51:49 +0530 Subject: [PATCH 1/2] fix(config-api): custom script creation failing #11307 Signed-off-by: pujavs --- .../docs/jans-config-api-swagger.yaml | 30 +++++++++++++------ .../plugins/docs/fido2-plugin-swagger.yaml | 6 +++- .../docs/jans-link-plugin-swagger.yaml | 16 +++++----- .../plugins/docs/kc-link-plugin-swagger.yaml | 16 +++++----- .../resource/auth/CustomScriptResource.java | 6 ++-- 5 files changed, 45 insertions(+), 29 deletions(-) diff --git a/jans-config-api/docs/jans-config-api-swagger.yaml b/jans-config-api/docs/jans-config-api-swagger.yaml index 991e1977c9a..a559813668d 100644 --- a/jans-config-api/docs/jans-config-api-swagger.yaml +++ b/jans-config-api/docs/jans-config-api-swagger.yaml @@ -9334,21 +9334,21 @@ components: $ref: '#/components/schemas/AttributeValidation' tooltip: type: string - adminCanAccess: + whitePagesCanView: + type: boolean + selected: type: boolean adminCanView: type: boolean - userCanView: + adminCanEdit: type: boolean userCanEdit: type: boolean - userCanAccess: - type: boolean - adminCanEdit: + userCanView: type: boolean - selected: + adminCanAccess: type: boolean - whitePagesCanView: + userCanAccess: type: boolean baseDn: type: string @@ -9402,6 +9402,8 @@ components: type: string requirePar: type: boolean + parForbidPublicClient: + type: boolean deviceAuthzEndpoint: type: string mtlsAuthorizationEndpoint: @@ -9833,6 +9835,10 @@ components: type: boolean sessionIdPersistInCache: type: boolean + sessionIdUserClaimsInAttributes: + type: array + items: + type: string includeSidInResponse: type: boolean disablePromptLogin: @@ -10391,6 +10397,12 @@ components: ssaExpirationInDays: type: integer format: int32 + ssaMapSoftwareRolesToScopes: + type: object + additionalProperties: + type: array + items: + type: string SsaValidationConfig: type: object properties: @@ -11781,10 +11793,10 @@ components: ttl: type: integer format: int32 - persisted: - type: boolean opbrowserState: type: string + persisted: + type: boolean SessionIdAccessMap: type: object properties: diff --git a/jans-config-api/plugins/docs/fido2-plugin-swagger.yaml b/jans-config-api/plugins/docs/fido2-plugin-swagger.yaml index 676fffd7240..5384db0df26 100644 --- a/jans-config-api/plugins/docs/fido2-plugin-swagger.yaml +++ b/jans-config-api/plugins/docs/fido2-plugin-swagger.yaml @@ -571,11 +571,15 @@ components: properties: authenticatorCertsFolder: type: string + mdsAccessToken: + type: string mdsCertsFolder: type: string mdsTocsFolder: type: string - userAutoEnrollment: + checkU2fAttestations: + type: boolean + debugUserAutoEnrollment: type: boolean unfinishedRequestExpiration: type: integer diff --git a/jans-config-api/plugins/docs/jans-link-plugin-swagger.yaml b/jans-config-api/plugins/docs/jans-link-plugin-swagger.yaml index 722b86a08a0..3e384a86dfe 100644 --- a/jans-config-api/plugins/docs/jans-link-plugin-swagger.yaml +++ b/jans-config-api/plugins/docs/jans-link-plugin-swagger.yaml @@ -103,7 +103,7 @@ components: attributeMapping: type: array items: - $ref: '#/components/schemas/LinkAttributeMapping' + $ref: '#/components/schemas/CacheRefreshAttributeMapping' snapshotFolder: type: string snapshotMaxCount: @@ -161,6 +161,13 @@ components: type: string useLocalCache: type: boolean + CacheRefreshAttributeMapping: + type: object + properties: + source: + type: string + destination: + type: string GluuLdapConfiguration: type: object properties: @@ -197,13 +204,6 @@ components: level: type: integer format: int32 - LinkAttributeMapping: - type: object - properties: - source: - type: string - destination: - type: string securitySchemes: oauth2: type: oauth2 diff --git a/jans-config-api/plugins/docs/kc-link-plugin-swagger.yaml b/jans-config-api/plugins/docs/kc-link-plugin-swagger.yaml index 4e65172aa6b..7e5898c9f56 100644 --- a/jans-config-api/plugins/docs/kc-link-plugin-swagger.yaml +++ b/jans-config-api/plugins/docs/kc-link-plugin-swagger.yaml @@ -139,7 +139,7 @@ components: attributeMapping: type: array items: - $ref: '#/components/schemas/LinkAttributeMapping' + $ref: '#/components/schemas/CacheRefreshAttributeMapping' snapshotFolder: type: string snapshotMaxCount: @@ -199,6 +199,13 @@ components: type: string useLocalCache: type: boolean + CacheRefreshAttributeMapping: + type: object + properties: + source: + type: string + destination: + type: string GluuLdapConfiguration: type: object properties: @@ -252,13 +259,6 @@ components: type: string password: type: string - LinkAttributeMapping: - type: object - properties: - source: - type: string - destination: - type: string JsonPatch: type: object securitySchemes: diff --git a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/CustomScriptResource.java b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/CustomScriptResource.java index e8b9e9df857..c9fc3847d89 100644 --- a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/CustomScriptResource.java +++ b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/CustomScriptResource.java @@ -484,8 +484,8 @@ private CustomScript updateFileTypeCustomScript(CustomScript customScript) { if (customScript == null) { return customScript; } - logger.info("Handling CustomScript if location type is File - customScript.getLocationType().getValue():{}, customScript.getLocationPath():{}", customScript.getLocationType().getValue(), customScript.getLocationPath()); - if (ScriptLocationType.FILE.getValue().equalsIgnoreCase(customScript.getLocationType().getValue())) { + logger.info("Handling CustomScript if location type is File - customScript.getLocationType():{}, customScript.getLocationPath():{}", customScript.getLocationType(), customScript.getLocationPath()); + if (customScript.getLocationPath()!=null && ScriptLocationType.FILE.getValue().equalsIgnoreCase(customScript.getLocationType().getValue())) { logger.info("Modifying customScript as getLocationType is File - customScript:{}", customScript); String fileName = CUSTOM_FILE_SCRIPT_DEFAULT_LOCATION; if (StringUtils.isNotBlank(customScript.getLocationPath())) { @@ -495,7 +495,7 @@ private CustomScript updateFileTypeCustomScript(CustomScript customScript) { } } - logger.info("\n\n Handling CustomScript if location type is File - customScript.getLocationType().getValue():{}, customScript.getLocationPath():{}", customScript.getLocationType().getValue(), customScript.getLocationPath()); + logger.info("\n\n Handling CustomScript if location type is File - customScript.getLocationType():{}, customScript.getLocationPath():{}", customScript.getLocationType(), customScript.getLocationPath()); return customScript; } From 8db96069d128b6ce8c0088c2bab2821812ca0a7e Mon Sep 17 00:00:00 2001 From: pujavs Date: Tue, 29 Apr 2025 23:08:21 +0530 Subject: [PATCH 2/2] fix(config-api): custom script creation failing #11307 Signed-off-by: pujavs --- jans-config-api/docs/jans-config-api-swagger.yaml | 12 ++++++------ .../rest/resource/auth/CustomScriptResource.java | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/jans-config-api/docs/jans-config-api-swagger.yaml b/jans-config-api/docs/jans-config-api-swagger.yaml index a559813668d..84eb8fbfb22 100644 --- a/jans-config-api/docs/jans-config-api-swagger.yaml +++ b/jans-config-api/docs/jans-config-api-swagger.yaml @@ -9334,22 +9334,22 @@ components: $ref: '#/components/schemas/AttributeValidation' tooltip: type: string - whitePagesCanView: - type: boolean selected: type: boolean adminCanView: type: boolean adminCanEdit: type: boolean - userCanEdit: - type: boolean userCanView: type: boolean + userCanEdit: + type: boolean adminCanAccess: type: boolean userCanAccess: type: boolean + whitePagesCanView: + type: boolean baseDn: type: string PatchRequest: @@ -11793,10 +11793,10 @@ components: ttl: type: integer format: int32 - opbrowserState: - type: string persisted: type: boolean + opbrowserState: + type: string SessionIdAccessMap: type: object properties: diff --git a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/CustomScriptResource.java b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/CustomScriptResource.java index c9fc3847d89..3c4155c7b5b 100644 --- a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/CustomScriptResource.java +++ b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/CustomScriptResource.java @@ -480,6 +480,7 @@ private void removeAuthenticationMethod() { private CustomScript updateFileTypeCustomScript(CustomScript customScript) { logger.info("Handling CustomScript if location type is File - customScript:{}", customScript); + // Note File type customScript is intended only for dev if (customScript == null) { return customScript;