Feature/audit certificate upload (#30223)
* feat: Add certificate upload option for audit logging settings * Commit current changes * Additions * MM-62944 Fix fileupload settings not being clickable * Support for uploading a cert for experimental audit logging cert. Pre cloud implementation in the backend * Forgot to add new hook * Add support for setting custom audit log certifcates in Cloud * Permissions * I18n * Change order * Linter fixes * Linter fixes, add openapi spec * additions for openapi * More openapi fixes because it won't run locally * Undo, cursor went rogue * newline fix * Align types properly * Fix i18n * Fix i18n AGAIN * Fix error * Update api/v4/source/audit_logging.yaml --------- Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -59,6 +59,7 @@ build-v4: node_modules playbooks
|
||||
@cat $(V4_SRC)/metrics.yaml >> $(V4_YAML)
|
||||
@cat $(V4_SRC)/scheduled_post.yaml >> $(V4_YAML)
|
||||
@cat $(V4_SRC)/custom_profile_attributes.yaml >> $(V4_YAML)
|
||||
@cat $(V4_SRC)/audit_logging.yaml >> $(V4_YAML)
|
||||
@if [ -r $(PLAYBOOKS_SRC)/paths.yaml ]; then cat $(PLAYBOOKS_SRC)/paths.yaml >> $(V4_YAML); fi
|
||||
@if [ -r $(PLAYBOOKS_SRC)/merged-definitions.yaml ]; then cat $(PLAYBOOKS_SRC)/merged-definitions.yaml >> $(V4_YAML); else cat $(V4_SRC)/definitions.yaml >> $(V4_YAML); fi
|
||||
@echo Extracting code samples
|
||||
|
||||
68
api/v4/source/audit_logging.yaml
Обычный файл
68
api/v4/source/audit_logging.yaml
Обычный файл
@@ -0,0 +1,68 @@
|
||||
/api/v4/audit_logs/certificate:
|
||||
post:
|
||||
tags:
|
||||
- audit_logs
|
||||
summary: Upload audit log certificate
|
||||
description: |
|
||||
Upload the certificate to be used for TLS verification with the audit log service.
|
||||
|
||||
##### Permissions
|
||||
Must have `sysconsole_write_experimental_features` permission.
|
||||
|
||||
__Minimum server version__: 10.9
|
||||
operationId: AddAuditLogCertificate
|
||||
requestBody:
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
certificate:
|
||||
description: The certificate file
|
||||
type: string
|
||||
format: binary
|
||||
required:
|
||||
- certificate
|
||||
responses:
|
||||
"200":
|
||||
description: Certificate upload successful
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/StatusOK"
|
||||
"400":
|
||||
$ref: "#/components/responses/BadRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/components/responses/Forbidden"
|
||||
"413":
|
||||
$ref: "#/components/responses/TooLarge"
|
||||
"501":
|
||||
$ref: "#/components/responses/NotImplemented"
|
||||
|
||||
delete:
|
||||
tags:
|
||||
- audit_logs
|
||||
summary: Remove audit log certificate
|
||||
description: |
|
||||
Delete the current certificate being used with the audit log service.
|
||||
|
||||
##### Permissions
|
||||
Must have `sysconsole_write_experimental_features` permission.
|
||||
|
||||
__Minimum server version__: 9.5
|
||||
operationId: RemoveAuditLogCertificate
|
||||
responses:
|
||||
"200":
|
||||
description: Certificate deletion successful
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/StatusOK"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/components/responses/Forbidden"
|
||||
"501":
|
||||
$ref: "#/components/responses/NotImplemented"
|
||||
@@ -80,7 +80,7 @@ tags:
|
||||
#### Session Token
|
||||
|
||||
|
||||
Make an HTTP POST to `your-mattermost-url.com/api/v4/users/login` with a JSON body indicating the user’s `login_id`, `password` and optionally the MFA `token`. The `login_id` can be an email, username or an AD/LDAP ID depending on the system's configuration.
|
||||
Make an HTTP POST to `your-mattermost-url.com/api/v4/users/login` with a JSON body indicating the user's `login_id`, `password` and optionally the MFA `token`. The `login_id` can be an email, username or an AD/LDAP ID depending on the system's configuration.
|
||||
|
||||
|
||||
```
|
||||
@@ -561,6 +561,8 @@ tags:
|
||||
description: Endpoints related to export files.
|
||||
- name: metrics
|
||||
description: Endpoints related to metrics, including the Client Performance Monitoring feature.
|
||||
- name: audit_logs
|
||||
description: Endpoints for managing audit log certificates and configuration.
|
||||
x-tagGroups:
|
||||
- name: Overview
|
||||
tags:
|
||||
@@ -618,6 +620,7 @@ x-tagGroups:
|
||||
- reports
|
||||
- custom profile attributes
|
||||
- metrics
|
||||
- audit_logs
|
||||
servers:
|
||||
- url: http://your-mattermost-url.com
|
||||
- url: https://your-mattermost-url.com
|
||||
|
||||
Ссылка в новой задаче
Block a user