Class: AWSCDK::BedrockAgentCore::IncludedOauth2TenantCredentialProviderProps

Inherits:
OAuth2CredentialProviderFactoryBaseProps
  • Object
show all
Defined in:
bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb

Overview

Props for IncludedOauth2ProviderConfig IdPs whose outbound documentation requires issuer, authorizationEndpoint, and/or tokenEndpoint (for example Okta, Auth0, Amazon Cognito, OneLogin, PingOne, CyberArk, FusionAuth).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(o_auth2_credential_provider_name: nil, tags: nil, client_id:, client_secret:, authorization_endpoint: nil, issuer: nil, token_endpoint: nil) ⇒ IncludedOauth2TenantCredentialProviderProps

Returns a new instance of IncludedOauth2TenantCredentialProviderProps.

Parameters:

  • o_auth2_credential_provider_name (String, nil) (defaults to: nil)

    Name of the credential provider.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    Tags for this credential provider.

  • client_id (String)

    OAuth2 client identifier.

  • client_secret (AWSCDK::SecretValue)

    OAuth2 client secret.

  • authorization_endpoint (String, nil) (defaults to: nil)

    OAuth2 authorization endpoint for your tenant.

  • issuer (String, nil) (defaults to: nil)

    Token issuer URL for your tenant (often the IdP base or issuer URI).

  • token_endpoint (String, nil) (defaults to: nil)

    OAuth2 token endpoint for your tenant.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 15

def initialize(o_auth2_credential_provider_name: nil, tags: nil, client_id:, client_secret:, authorization_endpoint: nil, issuer: nil, token_endpoint: nil)
  @o_auth2_credential_provider_name = o_auth2_credential_provider_name
  Jsii::Type.check_type(@o_auth2_credential_provider_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "oAuth2CredentialProviderName") unless @o_auth2_credential_provider_name.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
  @client_id = client_id
  Jsii::Type.check_type(@client_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientId")
  @client_secret = client_secret
  Jsii::Type.check_type(@client_secret, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TZWNyZXRWYWx1ZSJ9")), "clientSecret")
  @authorization_endpoint = authorization_endpoint
  Jsii::Type.check_type(@authorization_endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizationEndpoint") unless @authorization_endpoint.nil?
  @issuer = issuer
  Jsii::Type.check_type(@issuer, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "issuer") unless @issuer.nil?
  @token_endpoint = token_endpoint
  Jsii::Type.check_type(@token_endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tokenEndpoint") unless @token_endpoint.nil?
end

Instance Attribute Details

#authorization_endpointString? (readonly)

Note:

Default: - not specified; use when your IdP requires an explicit endpoint

OAuth2 authorization endpoint for your tenant.

Returns:

  • (String, nil)


60
61
62
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 60

def authorization_endpoint
  @authorization_endpoint
end

#client_idString (readonly)

OAuth2 client identifier.

Returns:

  • (String)


45
46
47
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 45

def client_id
  @client_id
end

#client_secretAWSCDK::SecretValue (readonly)

OAuth2 client secret.

NOTE: The client secret will be included in the CloudFormation template as part of synthesis. The service stores the secret in Secrets Manager after creation, but the value is visible in the template and deployment history. Use SecretValue.unsafePlainText() to explicitly acknowledge plaintext, or pass a reference from another construct to avoid embedding the literal value.

Returns:



55
56
57
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 55

def client_secret
  @client_secret
end

#issuerString? (readonly)

Note:

Default: - not specified; use when your IdP requires an explicit issuer

Token issuer URL for your tenant (often the IdP base or issuer URI).

Returns:

  • (String, nil)


65
66
67
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 65

def issuer
  @issuer
end

#o_auth2_credential_provider_nameString? (readonly)

Note:

Default: a name generated by CDK

Name of the credential provider.

Returns:

  • (String, nil)


36
37
38
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 36

def o_auth2_credential_provider_name
  @o_auth2_credential_provider_name
end

#tagsHash{String => String}? (readonly)

Note:

Default: - no tags

Tags for this credential provider.

Returns:

  • (Hash{String => String}, nil)


41
42
43
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 41

def tags
  @tags
end

#token_endpointString? (readonly)

Note:

Default: - not specified; use when your IdP requires an explicit endpoint

OAuth2 token endpoint for your tenant.

Returns:

  • (String, nil)


70
71
72
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 70

def token_endpoint
  @token_endpoint
end

Class Method Details

.jsii_propertiesObject



72
73
74
75
76
77
78
79
80
81
82
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 72

def self.jsii_properties
  {
    :o_auth2_credential_provider_name => "oAuth2CredentialProviderName",
    :tags => "tags",
    :client_id => "clientId",
    :client_secret => "clientSecret",
    :authorization_endpoint => "authorizationEndpoint",
    :issuer => "issuer",
    :token_endpoint => "tokenEndpoint",
  }
end

Instance Method Details

#to_jsiiObject



84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'bedrock_agent_core/included_oauth2_tenant_credential_provider_props.rb', line 84

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "oAuth2CredentialProviderName" => @o_auth2_credential_provider_name,
    "tags" => @tags,
    "clientId" => @client_id,
    "clientSecret" => @client_secret,
    "authorizationEndpoint" => @authorization_endpoint,
    "issuer" => @issuer,
    "tokenEndpoint" => @token_endpoint,
  })
  result.compact
end