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): asset management fetch issue #8205

Merged
merged 3 commits into from
Apr 2, 2024
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 @@ -97,7 +97,7 @@ private ApiAccessConstants() {

public static final String APP_VERSION_READ_ACCESS = "https://jans.io/oauth/config/app-version.readonly";

public static final String JANS_ASSET_READ_ACCESS = "https://jans.io/oauth/jans_asset-read";
public static final String JANS_ASSET_READ_ACCESS = "https://jans.io/oauth/config/jans_asset-read";
public static final String JANS_ASSET_WRITE_ACCESS = "https://jans.io/oauth/config/jans_asset-write";
public static final String JANS_ASSET_DELETE_ACCESS = "https://jans.io/oauth/config/jans_asset-delete";

Expand Down
53 changes: 44 additions & 9 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ paths:
$ref: '#/components/schemas/ApiError'
security:
- oauth2:
- https://jans.io/oauth/jans_asset-read
- https://jans.io/oauth/config/jans_asset-read
delete:
tags:
- Jans Assets
Expand Down Expand Up @@ -595,7 +595,7 @@ paths:
$ref: '#/components/schemas/ApiError'
security:
- oauth2:
- https://jans.io/oauth/jans_asset-read
- https://jans.io/oauth/config/jans_asset-read
/api/v1/jans-assets:
get:
tags:
Expand Down Expand Up @@ -713,7 +713,7 @@ paths:
$ref: '#/components/schemas/ApiError'
security:
- oauth2:
- https://jans.io/oauth/jans_asset-read
- https://jans.io/oauth/config/jans_asset-read
/api/v1/jans-assets/upload:
put:
tags:
Expand Down Expand Up @@ -4396,12 +4396,14 @@ paths:
- end_session
- post_authn
- select_account
- create_user
- scim
- ciba_end_user_notification
- revoke_token
- persistence_extension
- idp
- discovery
- health_check
- authz_detail
- update_token
- config_api_auth
Expand Down Expand Up @@ -8217,13 +8219,13 @@ components:
type: string
selected:
type: boolean
userCanEdit:
adminCanEdit:
type: boolean
adminCanView:
type: boolean
userCanView:
userCanEdit:
type: boolean
adminCanEdit:
userCanView:
type: boolean
userCanAccess:
type: boolean
Expand Down Expand Up @@ -8777,6 +8779,8 @@ components:
type: boolean
endSessionWithAccessToken:
type: boolean
disablePromptCreate:
type: boolean
cookieDomain:
type: string
enabledOAuthAuditLogging:
Expand Down Expand Up @@ -10038,12 +10042,14 @@ components:
- end_session
- post_authn
- select_account
- create_user
- scim
- ciba_end_user_notification
- revoke_token
- persistence_extension
- idp
- discovery
- health_check
- authz_detail
- update_token
- config_api_auth
Expand Down Expand Up @@ -10543,6 +10549,19 @@ components:
type: array
items:
type: string
externalUid:
type: array
items:
type: string
authenticator:
$ref: '#/components/schemas/UserAuthenticatorList'
status:
type: string
enum:
- active
- inactive
- expired
- register
customAttributes:
type: array
items:
Expand All @@ -10551,10 +10570,26 @@ components:
type: array
items:
type: string
status:
type: string
baseDn:
type: string
UserAuthenticator:
type: object
properties:
id:
type: string
type:
type: string
custom:
type: object
additionalProperties:
type: object
UserAuthenticatorList:
type: object
properties:
authenticators:
type: array
items:
$ref: '#/components/schemas/UserAuthenticator'
UmaResource:
required:
- name
Expand Down Expand Up @@ -10682,6 +10717,6 @@ components:
configuration properties
https://jans.io/oauth/client/authorizations.readonly: View ClientAuthorizations
https://jans.io/oauth/client/authorizations.delete: Revoke ClientAuthorizations
https://jans.io/oauth/jans_asset-read: View Jans Assets
https://jans.io/oauth/config/jans_asset-read: View Jans Assets
https://jans.io/oauth/config/jans_asset-write: Manage Jans Assets
https://jans.io/oauth/config/jans_asset-delete: Delete Jans Assets
13 changes: 12 additions & 1 deletion jans-config-api/plugins/docs/fido2-plugin-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ components:
type: string
push_token:
type: string
Fido2DeviceNotificationConf:
type: object
properties:
sns_endpoint_arn:
type: string
sns_endpoint_arn_remove:
type: string
sns_endpoint_arn_history:
type: array
items:
type: string
Fido2RegistrationData:
type: object
properties:
Expand Down Expand Up @@ -308,7 +319,7 @@ components:
- compromised
- canceled
deviceNotificationConf:
type: string
$ref: '#/components/schemas/Fido2DeviceNotificationConf'
deviceData:
$ref: '#/components/schemas/Fido2DeviceData'
expiration:
Expand Down
33 changes: 31 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 @@ -884,6 +884,19 @@ components:
type: array
items:
type: string
externalUid:
type: array
items:
type: string
authenticator:
$ref: '#/components/schemas/UserAuthenticatorList'
status:
type: string
enum:
- active
- inactive
- expired
- register
customAttributes:
type: array
items:
Expand All @@ -904,10 +917,26 @@ components:
type: string
userPassword:
type: string
status:
type: string
baseDn:
type: string
UserAuthenticator:
type: object
properties:
id:
type: string
type:
type: string
custom:
type: object
additionalProperties:
type: object
UserAuthenticatorList:
type: object
properties:
authenticators:
type: array
items:
$ref: '#/components/schemas/UserAuthenticator'
ApiError:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ public PagedResult<Document> searchAsset(SearchRequest searchRequest, String sta
targetArray, null);
Filter descriptionFilter = Filter.createSubstringFilter(AttributeConstants.DESCRIPTION, null,
targetArray, null);
Filter aliasFilter = Filter.createSubstringFilter("jansAlias", null, targetArray, null);
Filter inumFilter = Filter.createSubstringFilter(AttributeConstants.INUM, null, targetArray, null);
filters.add(Filter.createORFilter(displayNameFilter, descriptionFilter, aliasFilter, inumFilter));
filters.add(Filter.createORFilter(displayNameFilter, descriptionFilter, inumFilter));
}
searchFilter = Filter.createORFilter(filters);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2884,7 +2884,7 @@
"scopes": [
{
"inum": "1800.01.75",
"name": "https://jans.io/oauth/jans_asset-read"
"name": "https://jans.io/oauth/config/jans_asset-read"
}
],
"groupScopes": [
Expand Down