diff --git a/src/backend/api/specs/v1.yaml b/src/backend/api/specs/v1.yaml index 0358b2abd2..b148d9ed20 100644 --- a/src/backend/api/specs/v1.yaml +++ b/src/backend/api/specs/v1.yaml @@ -3010,8 +3010,14 @@ components: role assumption; may be required by the role administrator. role_session_name: type: string - description: An identifier for the role session, useful for - tracking sessions in AWS logs. + description: |- + An identifier for the role session, useful for tracking sessions in AWS logs. The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@- + + Examples: + - MySession123 + - User_Session-1 + - Test.Session@2 + pattern: ^[a-zA-Z0-9=,.@_-]+$ required: - role_arn - type: object @@ -3610,8 +3616,14 @@ components: assumption; may be required by the role administrator. role_session_name: type: string - description: An identifier for the role session, useful for tracking - sessions in AWS logs. + description: |- + An identifier for the role session, useful for tracking sessions in AWS logs. The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@- + + Examples: + - MySession123 + - User_Session-1 + - Test.Session@2 + pattern: ^[a-zA-Z0-9=,.@_-]+$ required: - role_arn - type: object @@ -3786,8 +3798,14 @@ components: role assumption; may be required by the role administrator. role_session_name: type: string - description: An identifier for the role session, useful for - tracking sessions in AWS logs. + description: |- + An identifier for the role session, useful for tracking sessions in AWS logs. The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@- + + Examples: + - MySession123 + - User_Session-1 + - Test.Session@2 + pattern: ^[a-zA-Z0-9=,.@_-]+$ required: - role_arn - type: object @@ -3976,8 +3994,14 @@ components: assumption; may be required by the role administrator. role_session_name: type: string - description: An identifier for the role session, useful for tracking - sessions in AWS logs. + description: |- + An identifier for the role session, useful for tracking sessions in AWS logs. The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@- + + Examples: + - MySession123 + - User_Session-1 + - Test.Session@2 + pattern: ^[a-zA-Z0-9=,.@_-]+$ required: - role_arn - type: object @@ -4615,7 +4639,6 @@ components: properties: email: type: string - format: email writeOnly: true password: type: string @@ -4719,7 +4742,6 @@ components: properties: email: type: string - format: email writeOnly: true minLength: 1 password: diff --git a/src/backend/api/v1/serializers.py b/src/backend/api/v1/serializers.py index e6b9d532a7..827bee410c 100644 --- a/src/backend/api/v1/serializers.py +++ b/src/backend/api/v1/serializers.py @@ -755,7 +755,15 @@ class AWSRoleAssumptionProviderSecret(serializers.Serializer): }, "role_session_name": { "type": "string", - "description": "An identifier for the role session, useful for tracking sessions in AWS logs.", + "description": "An identifier for the role session, useful for tracking sessions in AWS logs. " + "The regex used to validate this parameter is a string of characters consisting of " + "upper- and lower-case alphanumeric characters with no spaces. You can also include " + "underscores or any of the following characters: =,.@-\n\n" + "Examples:\n" + "- MySession123\n" + "- User_Session-1\n" + "- Test.Session@2", + "pattern": "^[a-zA-Z0-9=,.@_-]+$", }, }, "required": ["role_arn"],