-
Notifications
You must be signed in to change notification settings - Fork 62
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
Adds test for APIs related to security plugin and updates spec to add new APIs. #439
Changes from 15 commits
af53f9c
f5220c1
cd4709b
ec97b6b
4c51de4
a35cfda
488e774
0439eb2
f65a6cf
a25b14f
dce0965
ab976d4
463401a
ee3f3b4
092a1d6
757b0ed
70e9f4c
456bc51
588ff10
c86e8fa
892561b
7b34505
0eac313
f16a75a
41c2edf
7622f10
d73694e
85612c0
6537422
c87fa98
f12ee76
48cbc7f
cb5fe80
269b416
44160ab
aa3f2f3
a92aa5b
ef92ce6
2e090ee
688e69f
a91e52c
2b3494f
833c82e
451b179
cb0547e
54f4cfa
536cf04
87640ec
c4205c5
4227e00
b393538
2f30633
cc10600
355cace
172328a
7e6bf0c
705e6cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,6 +163,7 @@ subqueries | |
subschemas | ||
subword | ||
syserr | ||
tcnative | ||
tdigest | ||
tenantinfo | ||
termvectors | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,8 +60,6 @@ paths: | |
x-operation-group: security.post_dashboards_info | ||
x-version-added: '1.0' | ||
description: Updates the current security-dashboards plugin configuration. | ||
requestBody: | ||
$ref: '#/components/requestBodies/security.post_dashboards_info' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/security.post_dashboards_info@200' | ||
|
@@ -101,6 +99,8 @@ paths: | |
responses: | ||
'200': | ||
$ref: '#/components/responses/security.tenant_info@200' | ||
'403': | ||
$ref: '#/components/responses/security.tenant_info@403' | ||
'500': | ||
$ref: '#/components/responses/security.tenant_info@500' | ||
post: | ||
|
@@ -111,6 +111,8 @@ paths: | |
responses: | ||
'200': | ||
$ref: '#/components/responses/security.tenant_info@200' | ||
'403': | ||
$ref: '#/components/responses/security.tenant_info@403' | ||
'500': | ||
$ref: '#/components/responses/security.tenant_info@500' | ||
/_plugins/_security/whoami: | ||
|
@@ -145,7 +147,7 @@ paths: | |
$ref: '#/components/responses/security.who_am_i_protected@200' | ||
'500': | ||
$ref: '#/components/responses/security.who_am_i_protected@500' | ||
/_plugins/_security/_upgrade_check: | ||
/_plugins/_security/api/_upgrade_check: | ||
get: | ||
operationId: security.config_upgrade_check.0 | ||
x-operation-group: security.config_upgrade_check | ||
|
@@ -156,7 +158,7 @@ paths: | |
responses: | ||
'200': | ||
$ref: '#/components/responses/security.config_upgrade_check@200' | ||
/_plugins/_security/_upgrade_perform: | ||
/_plugins/_security/api/_upgrade_perform: | ||
post: | ||
operationId: security.config_upgrade_perform.0 | ||
x-operation-group: security.config_upgrade_perform | ||
|
@@ -386,6 +388,35 @@ paths: | |
responses: | ||
'200': | ||
$ref: '#/components/responses/security.flush_cache@200' | ||
/_plugins/_security/api/certificates: | ||
get: | ||
operationId: security.get_all_certificates.0 | ||
x-operation-group: security.get_all_certificates | ||
x-version-added: '2.15' | ||
description: Retrieves the cluster security certificates. | ||
parameters: | ||
- $ref: '#/components/parameters/security.get_all_certificates::query.cert_type' | ||
- $ref: '#/components/parameters/security.get_all_certificates::query.timeout' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/security.get_all_certificates@200' | ||
'500': | ||
$ref: '#/components/responses/security.get_all_certificates@500' | ||
/_plugins/_security/api/certificates/{node_id}: | ||
get: | ||
operationId: security.get_node_certificates.0 | ||
x-operation-group: security.get_node_certificates | ||
x-version-added: '2.15' | ||
description: Retrieves the given node's security certificates. | ||
parameters: | ||
- $ref: '#/components/parameters/security.get_node_certificates::path.node_id' | ||
- $ref: '#/components/parameters/security.get_node_certificates::query.cert_type' | ||
- $ref: '#/components/parameters/security.get_node_certificates::query.timeout' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/security.get_node_certificates@200' | ||
'500': | ||
$ref: '#/components/responses/security.get_node_certificates@500' | ||
/_plugins/_security/api/generateonbehalfoftoken: | ||
post: | ||
operationId: security.generate_obo_token.0 | ||
|
@@ -1064,9 +1095,7 @@ components: | |
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/MultiTenancyConfig' | ||
$ref: '../schemas/security._common.yaml#/components/schemas/MultiTenancyConfig' | ||
required: true | ||
security.create_user: | ||
content: | ||
|
@@ -1203,12 +1232,6 @@ components: | |
items: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/PatchOperation' | ||
required: true | ||
security.post_dashboards_info: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/DashboardsInfo' | ||
required: false | ||
security.update_audit_configuration: | ||
content: | ||
application/json: | ||
|
@@ -1346,7 +1369,7 @@ components: | |
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Unauthorized' | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Forbidden' | ||
security.delete_role@200: | ||
description: '' | ||
content: | ||
|
@@ -1461,12 +1484,36 @@ components: | |
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/GetCertificates' | ||
security.get_all_certificates@200: | ||
description: '' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/GetCertificatesNew' | ||
security.get_node_certificates@200: | ||
description: '' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/GetCertificatesNew' | ||
security.get_certificates@400: | ||
description: '' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/BadRequest' | ||
security.get_all_certificates@500: | ||
description: '' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/InternalServerError' | ||
security.get_node_certificates@500: | ||
description: '' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/InternalServerError' | ||
security.get_configuration@200: | ||
description: '' | ||
content: | ||
|
@@ -1496,7 +1543,7 @@ components: | |
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Unauthorized' | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Forbidden' | ||
security.get_distinguished_names@200: | ||
description: '' | ||
content: | ||
|
@@ -1508,7 +1555,7 @@ components: | |
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Unauthorized' | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Forbidden' | ||
security.get_permissions_info@200: | ||
description: '' | ||
content: | ||
|
@@ -1670,7 +1717,7 @@ components: | |
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Unauthorized' | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Forbidden' | ||
security.patch_distinguished_names@200: | ||
description: '' | ||
content: | ||
|
@@ -1682,7 +1729,7 @@ components: | |
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Unauthorized' | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Forbidden' | ||
security.patch_role@200: | ||
description: '' | ||
content: | ||
|
@@ -1809,6 +1856,14 @@ components: | |
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/TenantInfo' | ||
security.tenant_info@403: | ||
description: '' | ||
content: | ||
text/plain: | ||
type: string | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Forbidden' | ||
security.tenant_info@500: | ||
description: '' | ||
content: | ||
|
@@ -1838,7 +1893,7 @@ components: | |
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Unauthorized' | ||
$ref: '../schemas/security._common.yaml#/components/schemas/Forbidden' | ||
security.validate@200: | ||
description: '' | ||
content: | ||
|
@@ -1992,6 +2047,36 @@ components: | |
type: string | ||
description: Action group to retrieve. | ||
required: true | ||
security.get_node_certificates::path.node_id: | ||
name: node_id | ||
in: path | ||
schema: | ||
type: string | ||
required: true | ||
security.get_all_certificates::query.cert_type: | ||
name: cert_type | ||
in: query | ||
schema: | ||
type: string | ||
required: false | ||
security.get_node_certificates::query.cert_type: | ||
name: cert_type | ||
in: query | ||
schema: | ||
type: string | ||
required: false | ||
security.get_all_certificates::query.timeout: | ||
name: timeout | ||
in: query | ||
schema: | ||
type: string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these strings or one of the duration types? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is expected as a string to be utilized here: https://github.com/opensearch-project/security/blob/cc26b94ca84b562ae75ed8e2958a343831682042/src/main/java/org/opensearch/security/dlic/rest/api/CertificatesApiAction.java#L89 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean should this be
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i see, I have replaced it. |
||
required: false | ||
security.get_node_certificates::query.timeout: | ||
name: timeout | ||
in: query | ||
schema: | ||
type: string | ||
required: false | ||
security.get_distinguished_name::path.cluster_name: | ||
name: cluster_name | ||
in: path | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to mention tests as they are not external.
Mention additions here (e.g. "Added
/_plugins/_security/api/certificates/{node_id}
"), and fixes under fixes with some specifics (e.g. "Fixed/_plugins/_security/api/_upgrade_check
").There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated changelog. I've also added an entry for specs that I added originally.