From a24c0b95a3ee892bccc1882e4f328bab5f35645a Mon Sep 17 00:00:00 2001 From: pujavs <43700552+pujavs@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:55:16 +0530 Subject: [PATCH] fix(config-api): removed redundant field from core class, added desc for config-api configuration properties (#8673) * fix(config-api): user attribute validation error handling Signed-off-by: pujavs * fix(config-api): user attribute validation error handling Signed-off-by: pujavs * fix(config-api): user attribute validation error handling Signed-off-by: pujavs * fix: added new IDP attributes Signed-off-by: pujavs * fix: added new IDP attributes Signed-off-by: pujavs * fix(config-api): idp default values set Signed-off-by: pujavs * fix(config-api): idp metadata default values issue#8384 Signed-off-by: pujavs * feat: idp metadata default value and removing filepath in document-store Signed-off-by: pujavs * feat: idp metadata default value and removing filepath in document-store Signed-off-by: pujavs * fix: assetmgt and idp changes Signed-off-by: pujavs * fix: assetmgt and idp changes Signed-off-by: pujavs * fix(config-api): validation for imp fields of asset mgt Signed-off-by: pujavs * feat(config-api): pagination for get asset by name, asset filename and service validation Signed-off-by: pujavs * fix(config-api): added asset validation, removed redundant fields for TR Signed-off-by: pujavs * fix(config-api): agama swagger spec changes Signed-off-by: pujavs * fix(config-api): agama swagger spec changes Signed-off-by: pujavs * fix(config-api): added asset validation, removed redundant fields for TR Signed-off-by: pujavs * fix(config-api): added asset validation, removed redundant fields for TR Signed-off-by: pujavs * fix(config-api): added asset validation, removed redundant fields for TR Signed-off-by: pujavs * feat(config-api): user mgt error handling Signed-off-by: pujavs * feat(config-api): user mgt error handling Signed-off-by: pujavs * feat(config-api): user mgt error handling Signed-off-by: pujavs * feat(config-api): asset mgt service module changes Signed-off-by: pujavs * docs(config-api): configuration description changes for swagger spec Signed-off-by: pujavs * fix(core): removed redundant field from jans attribute issue#8665 Signed-off-by: pujavs --------- Signed-off-by: pujavs --- .../config-guide/attribute-configuration.md | 9 -- .../config-tools/config-api/attribute.md | 5 - .../configuration/AgamaConfiguration.java | 10 +- .../configuration/ApiAppConfiguration.java | 56 ++++++++++- .../model/configuration/AssetDirMapping.java | 14 +-- .../configuration/AssetMgtConfiguration.java | 30 ++---- .../model/configuration/AuditLogConf.java | 14 +-- .../DataFormatConversionConf.java | 10 +- .../model/configuration/PluginConf.java | 6 ++ .../docs/jans-config-api-swagger.yaml | 94 +++++++++++++++---- .../plugins/docs/user-mgt-plugin-swagger.yaml | 4 +- .../plugin/saml/rest/IdpResource.java | 5 +- .../resource/auth/ConfigBaseResource.java | 4 +- .../example/attribute/attribute-get-all.json | 2 - .../example/attribute/attribute-get.json | 1 - .../example/attribute/attribute.json | 1 - .../attribute/attribute-for-patch.json | 1 - .../feature/attribute/attribute.json | 1 - .../io/jans/configapi/core/util/AuthUtil.java | 2 +- .../java/io/jans/model/JansAttribute.java | 12 --- .../jans-config-api/dynamic-conf.json | 1 + terraform-provider-jans/jans/attributes.go | 1 - 22 files changed, 171 insertions(+), 112 deletions(-) diff --git a/docs/admin/config-guide/attribute-configuration.md b/docs/admin/config-guide/attribute-configuration.md index 77389570cfd..4d52d034103 100644 --- a/docs/admin/config-guide/attribute-configuration.md +++ b/docs/admin/config-guide/attribute-configuration.md @@ -122,7 +122,6 @@ Calling with params limit=1 "urn": "urn:jans:dir:attribute-def:inum", "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "adminCanAccess": true, "adminCanView": true, "adminCanEdit": true, @@ -175,7 +174,6 @@ Please wait while retrieving data ... "urn": "http://openid.net/specs/openid-connect-core-1_0.html/StandardClaims/profile", "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "adminCanAccess": true, "adminCanView": true, "adminCanEdit": true, @@ -209,7 +207,6 @@ Please wait while retrieving data ... "urn": "http://openid.net/specs/openid-connect-core-1_0.html/StandardClaims/picture", "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "adminCanAccess": true, "adminCanView": true, "adminCanEdit": true, @@ -269,7 +266,6 @@ It will return as below: "oxMultiValuedAttribute": true, "jansHideOnDiscovery": true, "custom": false, - "requred": true, "attributeValidation": { "minLength": { "type": "integer", @@ -331,7 +327,6 @@ It will create a new attribute into the Attribute list with updated `inum & dn`: "oxMultiValuedAttribute": true, "jansHideOnDiscovery": true, "custom": false, - "requred": false, "tooltip": "string", "adminCanAccess": false, "adminCanView": false, @@ -414,7 +409,6 @@ Server Response: "scimCustomAttr": null, "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "attributeValidation": null, "tooltip": null, "jansHideOnDiscovery": null @@ -470,7 +464,6 @@ Getting access token for scope https://jans.io/oauth/config/attributes.readonly "scimCustomAttr": null, "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "attributeValidation": null, "tooltip": null, "jansHideOnDiscovery": null @@ -554,7 +547,6 @@ Before patching the attribute, its properties are: "scimCustomAttr": null, "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "attributeValidation": null, "tooltip": null, "jansHideOnDiscovery": null @@ -602,7 +594,6 @@ Server Response: "scimCustomAttr": null, "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "attributeValidation": null, "tooltip": null, "jansHideOnDiscovery": true diff --git a/docs/admin/config-guide/config-tools/config-api/attribute.md b/docs/admin/config-guide/config-tools/config-api/attribute.md index d2da2a17465..523e0e03a3d 100644 --- a/docs/admin/config-guide/config-tools/config-api/attribute.md +++ b/docs/admin/config-guide/config-tools/config-api/attribute.md @@ -73,7 +73,6 @@ Attributes are individual pieces of user data, like uid or email, that are requi > "urn": "urn:mace:dir:attribute-def:departmentNumber", > "oxMultiValuedAttribute": false, > "custom": false, -> "requred": false, > "whitePagesCanView": false, > "adminCanEdit": true, > "userCanView": true, @@ -107,7 +106,6 @@ Attributes are individual pieces of user data, like uid or email, that are requi > "urn": "urn:mace:dir:attribute-def:phone_number", > "oxMultiValuedAttribute": false, > "custom": false, -> "requred": false, > "whitePagesCanView": false, > "adminCanEdit": true, > "userCanView": true, @@ -171,7 +169,6 @@ Attributes are individual pieces of user data, like uid or email, that are requi > "urn": "urn:mace:dir:attribute-def:departmentNumber", > "oxMultiValuedAttribute": false, > "custom": false, -> "requred": false, > "whitePagesCanView": false, > "adminCanEdit": true, > "userCanView": true, @@ -230,7 +227,6 @@ Attributes are individual pieces of user data, like uid or email, that are requi > "name": "qaattribute", > "origin": "jansPerson", > "jansMultivaluedAttr": false, -> "requred": false, > "status": "active", > "urn": "urn:mace:dir:attribute-def:qaattribute", > "userCanAccess": true, @@ -301,7 +297,6 @@ Attributes are individual pieces of user data, like uid or email, that are requi > "urn": "urn:mace:dir:attribute-def:departmentNumber", > "oxMultiValuedAttribute": false, > "custom": false, -> "requred": false, > "whitePagesCanView": false, > "adminCanEdit": true, > "userCanView": true, diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AgamaConfiguration.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AgamaConfiguration.java index 1f8c436e4cb..47814ea5b4d 100644 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AgamaConfiguration.java +++ b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AgamaConfiguration.java @@ -3,17 +3,15 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; + @JsonIgnoreProperties(ignoreUnknown = true) public class AgamaConfiguration { - /** - * List of attributes required to create the Agama Flow - */ + @Schema(description = "List of attributes required to create the Agama Flow.") private List mandatoryAttributes; - /** - * List of attributes that are optional - */ + @Schema(description = "List of attributes that are optional.") private List optionalAttributes; public List getMandatoryAttributes() { diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/ApiAppConfiguration.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/ApiAppConfiguration.java index 5268cee53cf..7d63ae588f7 100644 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/ApiAppConfiguration.java +++ b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/ApiAppConfiguration.java @@ -2,45 +2,96 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import io.jans.as.model.configuration.Configuration; +import io.jans.configapi.util.ApiConstants; import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; + @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppConfiguration implements Configuration { + @Schema(description = "OAuth authentication enable/disable flag. Default value `true`.") private boolean configOauthEnabled; + + @Schema(description = "Flag to enable/disable timer to dynamically reflect log configuration changes. Default value `true`Default value `false`.") private boolean disableLoggerTimer; + + @Schema(description = "Flag to enable/disable request audit. Default value `false`.") private boolean disableAuditLogger; + + @Schema(description = "Flag to enable/disable check if custom attribue is declared in schema. Default value `true`.") private boolean customAttributeValidationEnabled; + + @Schema(description = "List of approved external Auth server to validate token.") private List apiApprovedIssuer; + + @Schema(description = "Name of supported API protection mechansim. Supported type is `OAuth2`.") private String apiProtectionType; + + @Schema(description = "Config-API client ID.") private String apiClientId; + + @Schema(description = "Config-API client password.") private String apiClientPassword; - + private boolean endpointInjectionEnabled; + + @Schema(description = "Issuer Identifier of Jans OpenID Connect Provider.") private String authIssuerUrl; + + @Schema(description = "Jans OpenID Connect Provider Well-Known Configuration URL.") private String authOpenidConfigurationUrl; + + @Schema(description = "Jans URL of the OpenID Connect Provider's OAuth 2.0 Authorization Endpoint.") private String authOpenidIntrospectionUrl; + + @Schema(description = "Jans URL of the OpenID Connect Provider's OAuth 2.0 Token Endpoint.") private String authOpenidTokenUrl; + + @Schema(description = "Jans URL of the OpenID Connect Provider's OAuth 2.0 Revoke Token Endpoint.") private String authOpenidRevokeUrl; + @Schema(description = "List of oAuth scope that can be validity for an access tokens only by underlying Jans Auth server.") private List exclusiveAuthScopes; + @Schema(description = "CORS configuration filter properties.") private List corsConfigurationFilters; + @Schema(description = "Specify logging level of Loggers. Default level is `INFO`.") private String loggingLevel; + + @Schema(description = "Log4j logging layout. Default value `TEXT`.") private String loggingLayout; + + @Schema(description = "The path to the external log4j2 logging configuration.") private String externalLoggerConfiguration; + + @Schema(description = "Choose whether to disable JDK loggers.") private Boolean disableJdkLogger = true; + + @Schema(description = "Maximum number of results per page in search endpoints.") private int maxCount; + @Schema(description = "User attribute that should not be returned in response.") private List userExclusionAttributes; + + @Schema(description = "List of User mandatory attribute for user creation request.") private List userMandatoryAttributes; + + @Schema(description = "Agama configuration details.") private AgamaConfiguration agamaConfiguration; + + @Schema(description = "Audit Log configuration details.") private AuditLogConf auditLogConf; + + @Schema(description = "Configuration for data-type converstion.") private DataFormatConversionConf dataFormatConversionConf; + + @Schema(description = "Details of enabled plugins.") private List plugins; + @Schema(description = "Asset management configuration details.") private AssetMgtConfiguration assetMgtConfiguration; public boolean isConfigOauthEnabled() { @@ -209,6 +260,9 @@ public int getMaxCount() { public void setMaxCount(int maxCount) { this.maxCount = maxCount; + if(this.maxCount<=0) { + this.maxCount = ApiConstants.DEFAULT_MAX_COUNT; + } } public List getUserExclusionAttributes() { diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AssetDirMapping.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AssetDirMapping.java index 856ecfc02bd..99e9d9fcfb0 100644 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AssetDirMapping.java +++ b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AssetDirMapping.java @@ -3,22 +3,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; + @JsonIgnoreProperties(ignoreUnknown = true) public class AssetDirMapping { - /** - * Relative path to asset base directory - */ + @Schema(description = "Relative path to asset base directory.") private String directory; - /** - * List of file extention that are stored in directory - */ + @Schema(description = "List of file extention that are stored in directory.") private List type; - /** - * Description of assets stored in directory - */ + @Schema(description = "Description of assets stored in directory.") private String description; public String getDirectory() { diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AssetMgtConfiguration.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AssetMgtConfiguration.java index af8c69e2527..1069d102172 100644 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AssetMgtConfiguration.java +++ b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AssetMgtConfiguration.java @@ -3,42 +3,30 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; + @JsonIgnoreProperties(ignoreUnknown = true) public class AssetMgtConfiguration { - /** - * Flag indicating if asset management functionality is enabled - */ + @Schema(description = "Flag indicating if asset management functionality is enabled.") private boolean assetMgtEnabled; - /** - * Flag indicating if asset upload to server is enabled - */ + @Schema(description = "Flag indicating if asset upload to server is enabled.") private boolean assetServerUploadEnabled; - /** - * Flag indicating if file extension validation is enabled - */ + @Schema(description = "Flag indicating if file extension validation is enabled.") private boolean fileExtensionValidationEnabled; - /** - * Flag indicating if service module name extension validation is enabled - */ + @Schema(description = "Flag indicating if service module name extension validation is enabled.") private boolean moduleNameValidationEnabled; - /** - * Base directory on server to upload the asset - */ + @Schema(description = "Base directory on server to upload the asset.") private String assetBaseDirectory; - /** - * List of supported service module where asset can be uploaded - */ + @Schema(description = "List of supported service module where asset can be uploaded.") private List jansServiceModule; - /** - * Asset type mapped to server directory - */ + @Schema(description = "Asset type mapped to server directory.") private List assetDirMapping; public boolean isAssetMgtEnabled() { diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AuditLogConf.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AuditLogConf.java index 16f6a925722..fdc8ed0f171 100644 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AuditLogConf.java +++ b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/AuditLogConf.java @@ -5,22 +5,18 @@ import java.util.Collection; import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; + @JsonIgnoreProperties(ignoreUnknown = true) public class AuditLogConf { - /** - * Flag to enable and disable audit log - */ + @Schema(description = "Flag to enable and disable audit log.") private boolean enabled; - /** - * HTTP methods for which audit is disabled - */ + @Schema(description = "HTTP methods for which audit is disabled.") private Collection ignoreHttpMethod; - /** - * List of header HTTP attributes whose value is to be logged - */ + @Schema(description = "List of header HTTP attributes whose value is to be logged.") private List headerAttributes; public boolean isEnabled() { diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/DataFormatConversionConf.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/DataFormatConversionConf.java index b986d6a9d76..38c8fe7bfb2 100644 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/DataFormatConversionConf.java +++ b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/DataFormatConversionConf.java @@ -4,17 +4,15 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import io.swagger.v3.oas.annotations.media.Schema; + @JsonIgnoreProperties(ignoreUnknown = true) public class DataFormatConversionConf { - /** - * Flag to enable and disable data conversion - */ + @Schema(description = "Flag to enable and disable data conversion.") private boolean enabled; - /** - * HTTP methods for which data conversion is to be disabled - */ + @Schema(description = "HTTP methods for which data conversion is to be disabled.") private Collection ignoreHttpMethod; public boolean isEnabled() { diff --git a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/PluginConf.java b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/PluginConf.java index 65c6b1cffda..590b46a899c 100644 --- a/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/PluginConf.java +++ b/jans-config-api/common/src/main/java/io/jans/configapi/model/configuration/PluginConf.java @@ -1,12 +1,18 @@ package io.jans.configapi.model.configuration; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import io.swagger.v3.oas.annotations.media.Schema; @JsonIgnoreProperties(ignoreUnknown = true) public class PluginConf { + @Schema(description = "Name of the plugin.") private String name; + + @Schema(description = "Description of the plugin.") private String description; + + @Schema(description = "Plugin application class.") private String className; public String getName() { diff --git a/jans-config-api/docs/jans-config-api-swagger.yaml b/jans-config-api/docs/jans-config-api-swagger.yaml index 9d51ec9e484..fe211726056 100644 --- a/jans-config-api/docs/jans-config-api-swagger.yaml +++ b/jans-config-api/docs/jans-config-api-swagger.yaml @@ -1006,7 +1006,6 @@ paths: "urn": "urn:mace:dir:attribute-def:departmentNumber", "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "whitePagesCanView": false, "adminCanEdit": true, "userCanView": true, @@ -1040,7 +1039,6 @@ paths: "urn": "urn:mace:dir:attribute-def:phone_number", "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "whitePagesCanView": false, "adminCanEdit": true, "userCanView": true, @@ -1089,7 +1087,6 @@ paths: "name": "qaattribute", "origin": "jansPerson", "jansMultivaluedAttr": false, - "requred": false, "status": "active", "urn": "urn:mace:dir:attribute-def:qaattribute", "userCanAccess": true, @@ -1127,7 +1124,6 @@ paths: "name": "qaattribute", "origin": "jansPerson", "jansMultivaluedAttr": false, - "requred": false, "status": "active", "urn": "urn:mace:dir:attribute-def:qaattribute", "userCanAccess": true, @@ -1179,7 +1175,6 @@ paths: "name": "qaattribute", "origin": "jansPerson", "jansMultivaluedAttr": false, - "requred": false, "status": "active", "urn": "urn:mace:dir:attribute-def:qaattribute", "userCanAccess": true, @@ -1217,7 +1212,6 @@ paths: "name": "qaattribute", "origin": "jansPerson", "jansMultivaluedAttr": false, - "requred": false, "status": "active", "urn": "urn:mace:dir:attribute-def:qaattribute", "userCanAccess": true, @@ -1288,7 +1282,6 @@ paths: "urn": "urn:mace:dir:attribute-def:departmentNumber", "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "whitePagesCanView": false, "adminCanEdit": true, "userCanView": true, @@ -1382,7 +1375,6 @@ paths: "name": "qaattribute", "origin": "jansPerson", "jansMultivaluedAttr": false, - "requred": false, "status": "active", "urn": "urn:mace:dir:attribute-def:qaattribute", "userCanAccess": true, @@ -8299,28 +8291,26 @@ components: type: boolean custom: type: boolean - requred: - type: boolean attributeValidation: $ref: '#/components/schemas/AttributeValidation' tooltip: type: string selected: type: boolean - whitePagesCanView: - type: boolean - userCanView: - type: boolean adminCanEdit: type: boolean userCanEdit: type: boolean adminCanView: type: boolean + userCanView: + type: boolean adminCanAccess: type: boolean userCanAccess: type: boolean + whitePagesCanView: + type: boolean baseDn: type: string PatchRequest: @@ -9259,6 +9249,7 @@ components: format: int32 corsRequestDecorate: type: boolean + description: CORS configuration filter properties. EngineConfig: type: object properties: @@ -9920,10 +9911,10 @@ components: type: array items: type: object - displayValue: - type: string value: type: object + displayValue: + type: string LocalizedString: type: object properties: @@ -9936,72 +9927,110 @@ components: properties: mandatoryAttributes: type: array + description: List of attributes required to create the Agama Flow. items: type: string + description: List of attributes required to create the Agama Flow. optionalAttributes: type: array + description: List of attributes that are optional. items: type: string + description: List of attributes that are optional. + description: Agama configuration details. ApiAppConfiguration: type: object properties: configOauthEnabled: type: boolean + description: OAuth authentication enable/disable flag. Default value `true`. disableLoggerTimer: type: boolean + description: Flag to enable/disable timer to dynamically reflect log configuration + changes. Default value `true`Default value `false`. disableAuditLogger: type: boolean + description: Flag to enable/disable request audit. Default value `false`. customAttributeValidationEnabled: type: boolean + description: Flag to enable/disable check if custom attribue is declared + in schema. Default value `true`. apiApprovedIssuer: type: array + description: List of approved external Auth server to validate token. items: type: string + description: List of approved external Auth server to validate token. apiProtectionType: type: string + description: Name of supported API protection mechansim. Supported type + is `OAuth2`. apiClientId: type: string + description: Config-API client ID. apiClientPassword: type: string + description: Config-API client password. endpointInjectionEnabled: type: boolean authIssuerUrl: type: string + description: Issuer Identifier of Jans OpenID Connect Provider. authOpenidConfigurationUrl: type: string + description: Jans OpenID Connect Provider Well-Known Configuration URL. authOpenidIntrospectionUrl: type: string + description: Jans URL of the OpenID Connect Provider's OAuth 2.0 Authorization + Endpoint. authOpenidTokenUrl: type: string + description: Jans URL of the OpenID Connect Provider's OAuth 2.0 Token Endpoint. authOpenidRevokeUrl: type: string + description: Jans URL of the OpenID Connect Provider's OAuth 2.0 Revoke + Token Endpoint. exclusiveAuthScopes: type: array + description: List of oAuth scope that can be validity for an access tokens + only by underlying Jans Auth server. items: type: string + description: List of oAuth scope that can be validity for an access tokens + only by underlying Jans Auth server. corsConfigurationFilters: type: array + description: CORS configuration filter properties. items: $ref: '#/components/schemas/CorsConfigurationFilter' loggingLevel: type: string + description: Specify logging level of Loggers. Default level is `INFO`. loggingLayout: type: string + description: Log4j logging layout. Default value `TEXT`. externalLoggerConfiguration: type: string + description: The path to the external log4j2 logging configuration. disableJdkLogger: type: boolean + description: Choose whether to disable JDK loggers. maxCount: type: integer + description: Maximum number of results per page in search endpoints. format: int32 userExclusionAttributes: type: array + description: User attribute that should not be returned in response. items: type: string + description: User attribute that should not be returned in response. userMandatoryAttributes: type: array + description: List of User mandatory attribute for user creation request. items: type: string + description: List of User mandatory attribute for user creation request. agamaConfiguration: $ref: '#/components/schemas/AgamaConfiguration' auditLogConf: @@ -10010,6 +10039,7 @@ components: $ref: '#/components/schemas/DataFormatConversionConf' plugins: type: array + description: Details of enabled plugins. items: $ref: '#/components/schemas/PluginConf' assetMgtConfiguration: @@ -10019,64 +10049,92 @@ components: properties: directory: type: string + description: Relative path to asset base directory. type: type: array + description: List of file extention that are stored in directory. items: type: string + description: List of file extention that are stored in directory. description: type: string + description: Description of assets stored in directory. + description: Asset type mapped to server directory. AssetMgtConfiguration: type: object properties: assetMgtEnabled: type: boolean + description: Flag indicating if asset management functionality is enabled. assetServerUploadEnabled: type: boolean + description: Flag indicating if asset upload to server is enabled. fileExtensionValidationEnabled: type: boolean + description: Flag indicating if file extension validation is enabled. moduleNameValidationEnabled: type: boolean + description: Flag indicating if service module name extension validation + is enabled. assetBaseDirectory: type: string + description: Base directory on server to upload the asset. jansServiceModule: type: array + description: List of supported service module where asset can be uploaded. items: type: string + description: List of supported service module where asset can be uploaded. assetDirMapping: type: array + description: Asset type mapped to server directory. items: $ref: '#/components/schemas/AssetDirMapping' + description: Asset management configuration details. AuditLogConf: type: object properties: enabled: type: boolean + description: Flag to enable and disable audit log. ignoreHttpMethod: type: array + description: HTTP methods for which audit is disabled. items: type: string + description: HTTP methods for which audit is disabled. headerAttributes: type: array + description: List of header HTTP attributes whose value is to be logged. items: type: string + description: List of header HTTP attributes whose value is to be logged. + description: Audit Log configuration details. DataFormatConversionConf: type: object properties: enabled: type: boolean + description: Flag to enable and disable data conversion. ignoreHttpMethod: type: array + description: HTTP methods for which data conversion is to be disabled. items: type: string + description: HTTP methods for which data conversion is to be disabled. + description: Configuration for data-type converstion. PluginConf: type: object properties: name: type: string + description: Name of the plugin. description: type: string + description: Description of the plugin. className: type: string + description: Plugin application class. SmtpConfiguration: type: object properties: @@ -10639,10 +10697,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/plugins/docs/user-mgt-plugin-swagger.yaml b/jans-config-api/plugins/docs/user-mgt-plugin-swagger.yaml index 9113a738b01..a23d9c4e828 100644 --- a/jans-config-api/plugins/docs/user-mgt-plugin-swagger.yaml +++ b/jans-config-api/plugins/docs/user-mgt-plugin-swagger.yaml @@ -863,10 +863,10 @@ components: type: array items: type: object - displayValue: - type: string value: type: object + displayValue: + type: string CustomUser: type: object properties: diff --git a/jans-config-api/plugins/kc-saml-plugin/src/main/java/io/jans/configapi/plugin/saml/rest/IdpResource.java b/jans-config-api/plugins/kc-saml-plugin/src/main/java/io/jans/configapi/plugin/saml/rest/IdpResource.java index 42e07d76771..d4c35284b9a 100644 --- a/jans-config-api/plugins/kc-saml-plugin/src/main/java/io/jans/configapi/plugin/saml/rest/IdpResource.java +++ b/jans-config-api/plugins/kc-saml-plugin/src/main/java/io/jans/configapi/plugin/saml/rest/IdpResource.java @@ -40,7 +40,6 @@ import java.io.IOException; import java.io.InputStream; -import java.lang.reflect.InvocationTargetException; import java.util.List; import org.slf4j.Logger; @@ -60,8 +59,6 @@ public class IdpResource extends BaseResource { private static final String UNAUTHORIZED = "Unauthorized"; private static final String UNAUTHORIZED_MSG = "Realm client authorization failed while creating IDP."; private static final String APPLICATION_ERROR = "Application Error"; - private static final String SERVER_ERROR = "Server Error"; - private class IdentityProviderPagedResult extends PagedResult { }; @@ -304,7 +301,7 @@ public Response updateSamlIdentityProvider(@MultipartForm BrokerIdentityProvider @ProtectedApi(scopes = { Constants.JANS_IDP_SAML_DELETE_ACCESS }, groupScopes = { ApiAccessConstants.OPENID_DELETE_ACCESS }, superScopes = { ApiAccessConstants.SUPER_ADMIN_DELETE_ACCESS }) public Response deleteIdentityProvider( - @Parameter(description = "Unique identifier") @PathParam(ApiConstants.INUM) @NotNull String inum) throws Exception { + @Parameter(description = "Unique identifier") @PathParam(ApiConstants.INUM) @NotNull String inum) throws IOException { if (log.isDebugEnabled()) { log.debug("IdentityProvider to be deleted - inum:{} ", escapeLog(inum)); } diff --git a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/ConfigBaseResource.java b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/ConfigBaseResource.java index 780156f0e51..574d6272471 100644 --- a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/ConfigBaseResource.java +++ b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/ConfigBaseResource.java @@ -6,9 +6,9 @@ package io.jans.configapi.rest.resource.auth; +import io.jans.configapi.configuration.ConfigurationFactory; import io.jans.configapi.core.rest.BaseResource; import io.jans.configapi.util.ApiConstants; -import io.jans.configapi.configuration.ConfigurationFactory; import jakarta.inject.Inject; @@ -26,7 +26,7 @@ public class ConfigBaseResource extends BaseResource { @Inject ConfigurationFactory configurationFactory; - protected int getMaxCount() { + public int getMaxCount() { logger.trace(" MaxCount details - ApiAppConfiguration.MaxCount():{}, ApiConstants.DEFAULT_MAX_COUNT:{} ", configurationFactory.getApiAppConfiguration().getMaxCount(), ApiConstants.DEFAULT_MAX_COUNT); return (configurationFactory.getApiAppConfiguration().getMaxCount() > 0 diff --git a/jans-config-api/server/src/main/resources/example/attribute/attribute-get-all.json b/jans-config-api/server/src/main/resources/example/attribute/attribute-get-all.json index d46cd34f675..3688def2686 100644 --- a/jans-config-api/server/src/main/resources/example/attribute/attribute-get-all.json +++ b/jans-config-api/server/src/main/resources/example/attribute/attribute-get-all.json @@ -26,7 +26,6 @@ "urn": "urn:mace:dir:attribute-def:departmentNumber", "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "whitePagesCanView": false, "adminCanEdit": true, "userCanView": true, @@ -60,7 +59,6 @@ "urn": "urn:mace:dir:attribute-def:phone_number", "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "whitePagesCanView": false, "adminCanEdit": true, "userCanView": true, diff --git a/jans-config-api/server/src/main/resources/example/attribute/attribute-get.json b/jans-config-api/server/src/main/resources/example/attribute/attribute-get.json index 85ae5f03e07..9e95b55982b 100644 --- a/jans-config-api/server/src/main/resources/example/attribute/attribute-get.json +++ b/jans-config-api/server/src/main/resources/example/attribute/attribute-get.json @@ -21,7 +21,6 @@ "urn": "urn:mace:dir:attribute-def:departmentNumber", "oxMultiValuedAttribute": false, "custom": false, - "requred": false, "whitePagesCanView": false, "adminCanEdit": true, "userCanView": true, diff --git a/jans-config-api/server/src/main/resources/example/attribute/attribute.json b/jans-config-api/server/src/main/resources/example/attribute/attribute.json index 1e056c4379f..524420a6895 100644 --- a/jans-config-api/server/src/main/resources/example/attribute/attribute.json +++ b/jans-config-api/server/src/main/resources/example/attribute/attribute.json @@ -13,7 +13,6 @@ "name": "qaattribute", "origin": "jansPerson", "jansMultivaluedAttr": false, - "requred": false, "status": "active", "urn": "urn:mace:dir:attribute-def:qaattribute", "userCanAccess": true, diff --git a/jans-config-api/server/src/test/resources/feature/attribute/attribute-for-patch.json b/jans-config-api/server/src/test/resources/feature/attribute/attribute-for-patch.json index c0c685d4ce9..702ced2c3cf 100644 --- a/jans-config-api/server/src/test/resources/feature/attribute/attribute-for-patch.json +++ b/jans-config-api/server/src/test/resources/feature/attribute/attribute-for-patch.json @@ -13,7 +13,6 @@ "name": "testAttribute", "origin": "jansPerson", "jansMultivaluedAttr": false, - "requred": false, "status": "active", "urn": "urn:mace:dir:attribute-def:testAttribute", "userCanAccess": true, diff --git a/jans-config-api/server/src/test/resources/feature/attribute/attribute.json b/jans-config-api/server/src/test/resources/feature/attribute/attribute.json index 1e056c4379f..524420a6895 100644 --- a/jans-config-api/server/src/test/resources/feature/attribute/attribute.json +++ b/jans-config-api/server/src/test/resources/feature/attribute/attribute.json @@ -13,7 +13,6 @@ "name": "qaattribute", "origin": "jansPerson", "jansMultivaluedAttr": false, - "requred": false, "status": "active", "urn": "urn:mace:dir:attribute-def:qaattribute", "userCanAccess": true, diff --git a/jans-config-api/shared/src/main/java/io/jans/configapi/core/util/AuthUtil.java b/jans-config-api/shared/src/main/java/io/jans/configapi/core/util/AuthUtil.java index 30291d5ba45..de6a355836b 100644 --- a/jans-config-api/shared/src/main/java/io/jans/configapi/core/util/AuthUtil.java +++ b/jans-config-api/shared/src/main/java/io/jans/configapi/core/util/AuthUtil.java @@ -20,7 +20,7 @@ public class AuthUtil { @Inject ConfService confService; - + @Inject ClientService cltSrv; diff --git a/jans-core/service/src/main/java/io/jans/model/JansAttribute.java b/jans-core/service/src/main/java/io/jans/model/JansAttribute.java index fd5370b3807..58df06032bc 100644 --- a/jans-core/service/src/main/java/io/jans/model/JansAttribute.java +++ b/jans-core/service/src/main/java/io/jans/model/JansAttribute.java @@ -109,9 +109,6 @@ public class JansAttribute extends Entry implements Serializable { @Transient private boolean custom; - @Transient - private boolean requred; - @JsonObject @AttributeName(name = "jansValidation") private AttributeValidation attributeValidation; @@ -287,14 +284,6 @@ public void setCustom(boolean custom) { this.custom = custom; } - public boolean isRequred() { - return requred; - } - - public void setRequred(boolean requred) { - this.requred = requred; - } - public String getTooltip() { return tooltip; } @@ -376,7 +365,6 @@ public int hashCode() { result = prime * result + ((claimName == null) ? 0 : claimName.hashCode()); result = prime * result + ((oxMultiValuedAttribute == null) ? 0 : oxMultiValuedAttribute.hashCode()); result = prime * result + ((scimCustomAttr == null) ? 0 : scimCustomAttr.hashCode()); - result = prime * result + (requred ? 1231 : 1237); result = prime * result + ((saml1Uri == null) ? 0 : saml1Uri.hashCode()); result = prime * result + ((saml2Uri == null) ? 0 : saml2Uri.hashCode()); result = prime * result + ((seeAlso == null) ? 0 : seeAlso.hashCode()); diff --git a/jans-linux-setup/jans_setup/templates/jans-config-api/dynamic-conf.json b/jans-linux-setup/jans_setup/templates/jans-config-api/dynamic-conf.json index 96b3e76da88..12aea2614f4 100644 --- a/jans-linux-setup/jans_setup/templates/jans-config-api/dynamic-conf.json +++ b/jans-linux-setup/jans_setup/templates/jans-config-api/dynamic-conf.json @@ -17,6 +17,7 @@ "loggingLevel":"INFO", "loggingLayout":"text", "externalLoggerConfiguration":"", + "maxCount": 200, "exclusiveAuthScopes": [ "jans_stat", "https://jans.io/scim/users.read", diff --git a/terraform-provider-jans/jans/attributes.go b/terraform-provider-jans/jans/attributes.go index 5ae0e72f844..1d3ec204c42 100644 --- a/terraform-provider-jans/jans/attributes.go +++ b/terraform-provider-jans/jans/attributes.go @@ -39,7 +39,6 @@ type Attribute struct { OxMultiValuedAttribute bool `schema:"ox_multi_valued_attribute" json:"oxMultiValuedAttribute,omitempty"` JansHideOnDiscovery bool `schema:"jans_hide_on_discovery" json:"jansHideOnDiscovery,omitempty"` Custom bool `schema:"custom" json:"custom,omitempty"` - Required bool `schema:"required" json:"requred,omitempty"` AttributeValidation *AttributeValidation `schema:"attribute_validation" json:"attributeValidation,omitempty"` Tooltip string `schema:"tooltip" json:"tooltip,omitempty"` AdminCanAccess bool `schema:"admin_can_access" json:"adminCanAccess,omitempty"`