Skip to content

Commit

Permalink
fix(config-api): removed redundant field from core class, added desc …
Browse files Browse the repository at this point in the history
…for config-api configuration properties (#8673)

* fix(config-api): user attribute validation error handling

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): user attribute validation error handling

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): user attribute validation error handling

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix: added new IDP attributes

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix: added new IDP attributes

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): idp default values set

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): idp metadata default values issue#8384

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat: idp metadata default value and removing filepath in document-store

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat: idp metadata default value and removing filepath in document-store

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix: assetmgt and idp changes

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix: assetmgt and idp changes

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): validation for imp fields of asset mgt

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): pagination for get asset by name, asset filename and service validation

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): added asset validation, removed redundant fields for TR

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): agama swagger spec changes

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): agama swagger spec changes

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): added asset validation, removed redundant fields for TR

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): added asset validation, removed redundant fields for TR

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): added asset validation, removed redundant fields for TR

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): user mgt error handling

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): user mgt error handling

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): user mgt error handling

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset mgt service module changes

Signed-off-by: pujavs <pujas.works@gmail.com>

* docs(config-api): configuration description changes for swagger spec

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(core): removed redundant field from jans attribute issue#8665

Signed-off-by: pujavs <pujas.works@gmail.com>

---------

Signed-off-by: pujavs <pujas.works@gmail.com>
  • Loading branch information
pujavs committed Jun 7, 2024
1 parent 7c6fec4 commit a24c0b9
Show file tree
Hide file tree
Showing 22 changed files with 171 additions and 112 deletions.
9 changes: 0 additions & 9 deletions docs/admin/config-guide/attribute-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -269,7 +266,6 @@ It will return as below:
"oxMultiValuedAttribute": true,
"jansHideOnDiscovery": true,
"custom": false,
"requred": true,
"attributeValidation": {
"minLength": {
"type": "integer",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -414,7 +409,6 @@ Server Response:
"scimCustomAttr": null,
"oxMultiValuedAttribute": false,
"custom": false,
"requred": false,
"attributeValidation": null,
"tooltip": null,
"jansHideOnDiscovery": null
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -602,7 +594,6 @@ Server Response:
"scimCustomAttr": null,
"oxMultiValuedAttribute": false,
"custom": false,
"requred": false,
"attributeValidation": null,
"tooltip": null,
"jansHideOnDiscovery": true
Expand Down
5 changes: 0 additions & 5 deletions docs/admin/config-guide/config-tools/config-api/attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> mandatoryAttributes;

/**
* List of attributes that are optional
*/
@Schema(description = "List of attributes that are optional.")
private List<String> optionalAttributes;

public List<String> getMandatoryAttributes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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<String> exclusiveAuthScopes;

@Schema(description = "CORS configuration filter properties.")
private List<CorsConfigurationFilter> 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<String> userExclusionAttributes;

@Schema(description = "List of User mandatory attribute for user creation request.")
private List<String> 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<PluginConf> plugins;

@Schema(description = "Asset management configuration details.")
private AssetMgtConfiguration assetMgtConfiguration;

public boolean isConfigOauthEnabled() {
Expand Down Expand Up @@ -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<String> getUserExclusionAttributes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> type;

/**
* Description of assets stored in directory
*/
@Schema(description = "Description of assets stored in directory.")
private String description;

public String getDirectory() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> jansServiceModule;

/**
* Asset type mapped to server directory
*/
@Schema(description = "Asset type mapped to server directory.")
private List<AssetDirMapping> assetDirMapping;

public boolean isAssetMgtEnabled() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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<String> headerAttributes;

public boolean isEnabled() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> ignoreHttpMethod;

public boolean isEnabled() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
Loading

0 comments on commit a24c0b9

Please sign in to comment.