Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(config-api): user custom attribute changes and agama param changes #4123

Merged
merged 6 commits into from
Mar 10, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ private ApiConstants() {}

public static final String BASE_API_URL = "/";
public static final String CONFIG = "/config";
public static final String CONFIGS = "/configs";
public static final String API_CONFIG = "/api-config";
public static final String JWKS = "/jwks";
public static final String JANS_AUTH = "/jans-auth-server";
Expand Down Expand Up @@ -113,6 +114,7 @@ private ApiConstants() {}
public static final String ACTIVE = "active";
public static final String INACTIVE = "inactive";
public static final String ADD_SCRIPT_TEMPLATE = "addScriptTemplate";
public static final String REMOVE_NON_LDAP_ATTRIBUTES = "removeNonLDAPAttributes";

// API Protection
public static final String PROTECTION_TYPE_OAUTH2 = "oauth2";
Expand Down
73 changes: 53 additions & 20 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ paths:
security:
- oauth2:
- https://jans.io/oauth/config/agama.readonly
- https://jans.io/oauth/config/agama.write
- https://jans.io/oauth/config/read-all
post:
tags:
- Agama - Developer Studio
Expand Down Expand Up @@ -252,7 +250,6 @@ paths:
security:
- oauth2:
- https://jans.io/oauth/config/agama.write
- https://jans.io/oauth/config/write-all
delete:
tags:
- Agama - Developer Studio
Expand Down Expand Up @@ -282,19 +279,40 @@ paths:
- https://jans.io/oauth/config/agama.delete
/api/v1/agama-deployment/configs:
get:
operationId: getConfigs
tags:
- Agama - Developer Studio
summary: Retrieve the list of configs based on name.
description: Retrieve the list of configs based on name.
operationId: get-agama-dev-prj-configs
parameters:
- name: name
in: query
schema:
type: string
responses:
default:
description: default response
"200":
description: Agama projects configs
content:
application/json: {}
application/json:
schema:
type: string
examples:
Response json example:
description: Response json example
value: ""
"401":
description: Unauthorized
"500":
description: InternalServerError
security:
- oauth2:
- https://jans.io/oauth/config/agama.readonly
put:
operationId: setConfigs
tags:
- Agama - Developer Studio
summary: Update an Agama project.
description: Update an Agama project.
operationId: put-agama-dev-studio-prj
parameters:
- name: name
in: query
Expand All @@ -310,10 +328,27 @@ paths:
additionalProperties:
type: object
responses:
default:
description: default response
"202":
description: Agama project accepted
content:
application/json: {}
application/json:
schema:
type: string
examples:
Response json example:
description: Response json example
value: ""
"400":
description: Bad Request
"401":
description: Unauthorized
"409":
description: Conflict
"500":
description: InternalServerError
security:
- oauth2:
- https://jans.io/oauth/config/agama.write
/api/v1/agama-deployment/list:
get:
tags:
Expand Down Expand Up @@ -350,8 +385,6 @@ paths:
security:
- oauth2:
- https://jans.io/oauth/config/agama.readonly
- https://jans.io/oauth/config/agama.write
- https://jans.io/oauth/config/read-all
/api/v1/agama:
get:
tags:
Expand Down Expand Up @@ -7573,20 +7606,20 @@ components:
$ref: '#/components/schemas/AttributeValidation'
tooltip:
type: string
adminCanAccess:
whitePagesCanView:
type: boolean
adminCanView:
type: boolean
adminCanEdit:
type: boolean
userCanAccess:
type: boolean
userCanView:
type: boolean
whitePagesCanView:
type: boolean
userCanEdit:
type: boolean
adminCanAccess:
type: boolean
adminCanEdit:
type: boolean
baseDn:
type: string
PatchRequest:
Expand Down Expand Up @@ -8975,10 +9008,10 @@ components:
type: array
items:
type: object
displayValue:
type: string
value:
type: object
displayValue:
type: string
LocalizedString:
type: object
properties:
Expand Down
36 changes: 34 additions & 2 deletions jans-config-api/plugins/docs/user-mgt-plugin-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ paths:
summary: Update User
description: Update User
operationId: put-user
parameters:
- name: removeNonLDAPAttributes
in: query
description: "Boolean flag to indicate if attributes to be removed for non-LDAP\
\ DB. Default value is true, indicating non-LDAP attributes will be removed\
\ from request."
schema:
type: boolean
default: true
requestBody:
description: User object
content:
Expand Down Expand Up @@ -302,6 +311,8 @@ paths:
"givenName": "Test3",
"baseDn": "inum=559a7e26-7a33-4e11-9d42-13266d33261e,ou=people,o=jans"
}
"400":
description: Bad Request
"401":
description: Unauthorized
"404":
Expand All @@ -317,6 +328,15 @@ paths:
summary: Create new User
description: Create new User
operationId: post-user
parameters:
- name: removeNonLDAPAttributes
in: query
description: "Boolean flag to indicate if attributes to be removed for non-LDAP\
\ DB. Default value is true, indicating non-LDAP attributes will be removed\
\ from request."
schema:
type: boolean
default: true
requestBody:
description: User object
content:
Expand Down Expand Up @@ -495,6 +515,8 @@ paths:
"givenName": "Test3",
"baseDn": "inum=559a7e26-7a33-4e11-9d42-13266d33261e,ou=people,o=jans"
}
"400":
description: Bad Request
"401":
description: Unauthorized
"500":
Expand Down Expand Up @@ -654,6 +676,14 @@ paths:
required: true
schema:
type: string
- name: removeNonLDAPAttributes
in: query
description: "Boolean flag to indicate if attributes to be removed for non-LDAP\
\ DB. Default value is true, indicating non-LDAP attributes will be removed\
\ from request."
schema:
type: boolean
default: true
requestBody:
description: UserPatchRequest
content:
Expand Down Expand Up @@ -772,6 +802,8 @@ paths:
"givenName": "Test3",
"baseDn": "inum=559a7e26-7a33-4e11-9d42-13266d33261e,ou=people,o=jans"
}
"400":
description: Bad Request
"401":
description: Unauthorized
"404":
Expand All @@ -794,10 +826,10 @@ components:
type: array
items:
type: object
displayValue:
type: string
value:
type: object
displayValue:
type: string
CustomUser:
type: object
properties:
Expand Down
Loading