GithubOAuth2CredentialProviderProps

class aws_cdk.aws_bedrockagentcore.GithubOAuth2CredentialProviderProps(*, o_auth2_credential_provider_name=None, tags=None, client_id, client_secret)

Bases: OAuth2CredentialProviderFactoryBaseProps

Props for {@link OAuth2CredentialProvider.usingGithub}.

Parameters:
  • o_auth2_credential_provider_name (Optional[str]) – Name of the credential provider. Default: a name generated by CDK

  • tags (Optional[Mapping[str, str]]) – Tags for this credential provider. Default: - no tags

  • client_id (str) – OAuth2 client identifier.

  • client_secret (SecretValue) – 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.

ExampleMetadata:

fixture=default infused

Example:

gateway = agentcore.Gateway(self, "MyGateway",
    gateway_name="my-gateway"
)

oauth = agentcore.OAuth2CredentialProvider.using_github(self, "GhOAuth",
    o_auth2_credential_provider_name="github-oauth",
    client_id="your-client-id",
    client_secret=cdk.SecretValue.unsafe_plain_text("your-client-secret")
)

gateway.add_mcp_server_target("Mcp",
    gateway_target_name="mcp-server",
    description="MCP with GitHub OAuth",
    endpoint="https://my-mcp-server.example.com",
    credential_provider_configurations=[
        agentcore.GatewayCredentialProvider.from_oauth_identity(oauth,
            scopes=["read:user"]
        )
    ]
)

Attributes

client_id

OAuth2 client identifier.

client_secret

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.

o_auth2_credential_provider_name

Name of the credential provider.

Default:

a name generated by CDK

tags

Tags for this credential provider.

Default:
  • no tags