import { BaseGitHubApps } from '@catnekaise/ghrawel'
new BaseGitHubApps ( scope : Construct , id : string , baseProps : GitHubAppsProps )
Type: constructs.Construct
public toString ( ) : string
Returns a string representation of this construct.
public getAppIdForAppName ( name ?: string ) : number
public grantAccess ( principal : IPrincipal ) : Grant
Type: aws-cdk-lib.aws_iam.IPrincipal
Name
Description
isConstruct
Checks if x
is a construct.
import { BaseGitHubApps } from '@catnekaise/ghrawel'
BaseGitHubApps . isConstruct ( x : any )
Checks if x
is a construct.
Any object.
public readonly node : Node ;
The tree node.
public readonly secretsPrefix: string ;
public readonly secretsStorage: GitHubAppSecretsStorage ;
import { ManagedGitHubApps } from '@catnekaise/ghrawel'
new ManagedGitHubApps ( scope : Construct , id : string , props : ManagedGitHubAppsProps )
Type: constructs.Construct
public toString ( ) : string
Returns a string representation of this construct.
public getAppIdForAppName ( name ?: string ) : number
public grantAccess ( principal : IPrincipal ) : Grant
Type: aws-cdk-lib.aws_iam.IPrincipal
Name
Description
isConstruct
Checks if x
is a construct.
import { ManagedGitHubApps } from '@catnekaise/ghrawel'
ManagedGitHubApps . isConstruct ( x : any )
Checks if x
is a construct.
Any object.
public readonly node : Node ;
The tree node.
public readonly secretsPrefix: string ;
public readonly secretsStorage: GitHubAppSecretsStorage ;
import { SelfManagedGitHubApps } from '@catnekaise/ghrawel'
new SelfManagedGitHubApps ( scope : Construct , id : string , props : GitHubAppsProps )
Type: constructs.Construct
public toString ( ) : string
Returns a string representation of this construct.
public getAppIdForAppName ( name ?: string ) : number
public grantAccess ( principal : IPrincipal ) : Grant
Type: aws-cdk-lib.aws_iam.IPrincipal
Name
Description
isConstruct
Checks if x
is a construct.
import { SelfManagedGitHubApps } from '@catnekaise/ghrawel'
SelfManagedGitHubApps . isConstruct ( x : any )
Checks if x
is a construct.
Any object.
public readonly node : Node ;
The tree node.
public readonly secretsPrefix: string ;
public readonly secretsStorage: GitHubAppSecretsStorage ;
This construct may receive some changes before constructor is made public.
Until then use static create method.
public toString ( ) : string
Returns a string representation of this construct.
public grantExecute ( role : IRole , repo : string , owner ?: string ) : Grant
Use this to grant access to the token provider.
Type: aws-cdk-lib.aws_iam.IRole
grantExecuteGitHubActionsAbac
public grantExecuteGitHubActionsAbac ( role : IRole , settings : TokenProviderActionsIdentitySettings ) : Grant
use this to grant access to the token provider when the role is assumed via Cognito Identity.
Type: aws-cdk-lib.aws_iam.IRole
public metric ( metricName : string, stage : IStage , props ?: MetricOptions ) : Metric
Type: aws-cdk-lib.aws_apigateway.IStage
Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public metricCacheHitCount ( stage : IStage , props ?: MetricOptions ) : Metric
Type: aws-cdk-lib.aws_apigateway.IStage
Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public metricCacheMissCount ( stage : IStage , props ?: MetricOptions ) : Metric
Type: aws-cdk-lib.aws_apigateway.IStage
Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public metricClientError ( stage : IStage , props ?: MetricOptions ) : Metric
Type: aws-cdk-lib.aws_apigateway.IStage
Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public metricCount ( stage : IStage , props ?: MetricOptions ) : Metric
Type: aws-cdk-lib.aws_apigateway.IStage
Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public metricServerError ( stage : IStage , props ?: MetricOptions ) : Metric
Type: aws-cdk-lib.aws_apigateway.IStage
Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
import { TokenProvider } from '@catnekaise/ghrawel'
TokenProvider . isConstruct ( x : any )
Checks if x
is a construct.
Any object.
import { TokenProvider } from '@catnekaise/ghrawel'
TokenProvider . create ( scope : Construct , id : string , settings : TokenProviderSettings )
Type: constructs.Construct
Name
Type
Description
node
constructs.Node
The tree node.
httpMethod
string
No description.
methodArn
string
No description.
methodId
string
No description.
public readonly node : Node ;
The tree node.
public readonly httpMethod: string ;
public readonly methodArn: string ;
public readonly methodId: string ;
import { TokenProviderApi } from '@catnekaise/ghrawel'
new TokenProviderApi ( scope : Construct , id : string , props : TokenProviderApiProps )
Type: constructs.Construct
public toString ( ) : string
Returns a string representation of this construct.
public newTokenProvider ( name : string , configuration : NewTokenProviderConfiguration ) : ITokenProvider
Name
Description
isConstruct
Checks if x
is a construct.
import { TokenProviderApi } from '@catnekaise/ghrawel'
TokenProviderApi . isConstruct ( x : any )
Checks if x
is a construct.
Any object.
Name
Type
Description
node
constructs.Node
The tree node.
lambdaFunction
aws-cdk-lib.aws_lambda.Function
No description.
restApi
aws-cdk-lib.aws_apigateway.RestApi
No description.
public readonly node : Node ;
The tree node.
public readonly lambdaFunction: Function ;
Type: aws-cdk-lib.aws_lambda.Function
public readonly restApi: RestApi ;
Type: aws-cdk-lib.aws_apigateway.RestApi
import { GitHubAppPermissions } from '@catnekaise/ghrawel'
const gitHubAppPermissions : GitHubAppPermissions = { ... }
public readonly actions: PermissionLevel ;
public readonly administration: PermissionLevel ;
public readonly checks: PermissionLevel ;
public readonly codespaces: PermissionLevel ;
public readonly contents: PermissionLevel ;
dependabotSecrets
Optional
public readonly dependabotSecrets: PermissionLevel ;
public readonly deployments: PermissionLevel ;
public readonly emailAddresses: PermissionLevel ;
public readonly environments: PermissionLevel ;
public readonly followers: PermissionLevel ;
public readonly gitSshKeys: PermissionLevel ;
public readonly gpgKeys: PermissionLevel ;
interactionLimits
Optional
public readonly interactionLimits: PermissionLevel ;
public readonly issues: PermissionLevel ;
public readonly members: PermissionLevel ;
public readonly metadata: PermissionLevel ;
organizationAdministration
Optional
public readonly organizationAdministration: PermissionLevel ;
organizationAnnouncementBanners
Optional
public readonly organizationAnnouncementBanners: PermissionLevel ;
organizationCopilotSeatManagement
Optional
public readonly organizationCopilotSeatManagement: PermissionLevel ;
organizationCustomOrgRoles
Optional
public readonly organizationCustomOrgRoles: PermissionLevel ;
organizationCustomProperties
Optional
public readonly organizationCustomProperties: PermissionLevel ;
organizationCustomRoles
Optional
public readonly organizationCustomRoles: PermissionLevel ;
organizationEvents
Optional
public readonly organizationEvents: PermissionLevel ;
organizationHooks
Optional
public readonly organizationHooks: PermissionLevel ;
organizationPackages
Optional
public readonly organizationPackages: PermissionLevel ;
organizationPersonalAccessTokenRequests
Optional
public readonly organizationPersonalAccessTokenRequests: PermissionLevel ;
organizationPersonalAccessTokens
Optional
public readonly organizationPersonalAccessTokens: PermissionLevel ;
public readonly organizationPlan: PermissionLevel ;
organizationProjects
Optional
public readonly organizationProjects: PermissionLevel ;
organizationSecrets
Optional
public readonly organizationSecrets: PermissionLevel ;
organizationSelfHostedRunners
Optional
public readonly organizationSelfHostedRunners: PermissionLevel ;
organizationUserBlocking
Optional
public readonly organizationUserBlocking: PermissionLevel ;
public readonly packages: PermissionLevel ;
public readonly pages : PermissionLevel ;
public readonly profile: PermissionLevel ;
public readonly pullRequests: PermissionLevel ;
repositoryCustomProperties
Optional
public readonly repositoryCustomProperties: PermissionLevel ;
public readonly repositoryHooks: PermissionLevel ;
repositoryProjects
Optional
public readonly repositoryProjects: PermissionLevel ;
public readonly secrets: PermissionLevel ;
secretScanningAlerts
Optional
public readonly secretScanningAlerts: PermissionLevel ;
public readonly securityEvents: PermissionLevel ;
public readonly singleFile: PermissionLevel ;
public readonly starring: PermissionLevel ;
public readonly statuses: PermissionLevel ;
public readonly teamDiscussions: PermissionLevel ;
vulnerabilityAlerts
Optional
public readonly vulnerabilityAlerts: PermissionLevel ;
public readonly workflows: PermissionLevel ;
import { GitHubAppsProps } from '@catnekaise/ghrawel'
const gitHubAppsProps : GitHubAppsProps = { ... }
public readonly defaultAppId: number ;
public readonly storage: GitHubAppSecretsStorage ;
public readonly additionalApps: GitHubApp [ ] ;
public readonly prefix: string ;
Type: string
Default: /catnekaise/github-apps
import { ManagedGitHubAppsProps } from '@catnekaise/ghrawel'
const managedGitHubAppsProps : ManagedGitHubAppsProps = { ... }
public readonly defaultAppId: number ;
public readonly storage: GitHubAppSecretsStorage ;
public readonly additionalApps: GitHubApp [ ] ;
public readonly prefix: string ;
Type: string
Default: /catnekaise/github-apps
public readonly kmsKey: IKey ;
Type: aws-cdk-lib.aws_kms.IKey
Default: AWS_MANAGED
public readonly removalPolicy: RemovalPolicy ;
Type: aws-cdk-lib.RemovalPolicy
NewTokenProviderConfiguration
import { NewTokenProviderConfiguration } from '@catnekaise/ghrawel'
const newTokenProviderConfiguration : NewTokenProviderConfiguration = { ... }
public readonly permissions: GitHubAppPermissions ;
Permissions.
public readonly app : string ;
Type: string
Default: default
public readonly endpoint: TokenProviderEndpoint ;
public readonly targetRule: TokenProviderTargetRule ;
import { TargetRuleSettings } from '@catnekaise/ghrawel'
const targetRuleSettings : TargetRuleSettings = { ... }
public readonly mode : RepositorySelectionMode ;
TokenProviderActionsIdentitySettings
import { TokenProviderActionsIdentitySettings } from '@catnekaise/ghrawel'
const tokenProviderActionsIdentitySettings : TokenProviderActionsIdentitySettings = { ... }
public readonly claimsContext: IClaimsContext ;
Type: @catnekaise/cdk-iam-utilities.IClaimsContext
public readonly pathStrategy: TokenProviderPathStrategy ;
import { TokenProviderApiProps } from '@catnekaise/ghrawel'
const tokenProviderApiProps : TokenProviderApiProps = { ... }
Name
Type
Description
apps
IGitHubApps
GitHub Apps configuration.
api
aws-cdk-lib.aws_apigateway.RestApi
Use this to provide the API Gateway RestApi configured to your requirements.
lambda
aws-cdk-lib.aws_lambda.Function
Use this to provide the Lambda Function configured to your requirements.
public readonly apps : IGitHubApps ;
GitHub Apps configuration.
public readonly api : RestApi ;
Type: aws-cdk-lib.aws_apigateway.RestApi
Use this to provide the API Gateway RestApi configured to your requirements.
public readonly lambda: Function ;
Type: aws-cdk-lib.aws_lambda.Function
Use this to provide the Lambda Function configured to your requirements.
TokenProviderConfiguratorIntegrationOptionsContext
import { TokenProviderConfiguratorIntegrationOptionsContext } from '@catnekaise/ghrawel'
const tokenProviderConfiguratorIntegrationOptionsContext : TokenProviderConfiguratorIntegrationOptionsContext = { ... }
public readonly appId : number ;
public readonly appName: string ;
public readonly endpoint: TokenProviderEndpoint ;
public readonly name : string ;
public readonly permissions: GitHubAppPermissions ;
public readonly targetRule: TargetRuleSettings ;
TokenProviderConfiguratorMethodOptionsContext
import { TokenProviderConfiguratorMethodOptionsContext } from '@catnekaise/ghrawel'
const tokenProviderConfiguratorMethodOptionsContext : TokenProviderConfiguratorMethodOptionsContext = { ... }
public readonly endpointType: TokenProviderEndpointType ;
errorResponseModel
Required
public readonly errorResponseModel: Model ;
Type: aws-cdk-lib.aws_apigateway.Model
public readonly operationName: string ;
repositorySelectionMode
Required
public readonly repositorySelectionMode: RepositorySelectionMode ;
tokenResponseModel
Required
public readonly tokenResponseModel: Model ;
Type: aws-cdk-lib.aws_apigateway.Model
public readonly requestValidator: IRequestValidator ;
Type: aws-cdk-lib.aws_apigateway.IRequestValidator
TokenProviderLambdaCodeOptions
Use this to build a supported the TokenProvider lambda application when the source is located in a public repository.
import { TokenProviderLambdaCodeOptions } from '@catnekaise/ghrawel'
const tokenProviderLambdaCodeOptions : TokenProviderLambdaCodeOptions = { ... }
public readonly architecture: ApplicationArchitecture ;
Should be equal to the architecture configured for the lambda function.
This value is used to build the application in the specified architecture.
public readonly checkout: string ;
Value for git checkout
after cloning the repository Example: main, origin/feature1, SHA.
public readonly platform: string ;
Value for docker platform Example: linux/amd64.
public readonly repository: string ;
Repository Url Example: https://github.com/catnekaise/example-fork.git .
TokenProviderMethodOptions
import { TokenProviderMethodOptions } from '@catnekaise/ghrawel'
const tokenProviderMethodOptions : TokenProviderMethodOptions = { ... }
public readonly endpointType: TokenProviderEndpointType ;
errorResponseModel
Required
public readonly errorResponseModel: Model ;
Type: aws-cdk-lib.aws_apigateway.Model
public readonly operationName: string ;
public readonly requestValidator: RequestValidator ;
Type: aws-cdk-lib.aws_apigateway.RequestValidator
tokenResponseModel
Required
public readonly tokenResponseModel: Model ;
Type: aws-cdk-lib.aws_apigateway.Model
import { TokenProviderSettings } from '@catnekaise/ghrawel'
const tokenProviderSettings : TokenProviderSettings = { ... }
public readonly api : IRestApi ;
Type: aws-cdk-lib.aws_apigateway.IRestApi
public readonly app : string ;
public readonly appId : number ;
public readonly configurator: TokenProviderConfigurator ;
public readonly endpoint: TokenProviderEndpoint ;
public readonly lambda: Function ;
Type: aws-cdk-lib.aws_lambda.Function
public readonly methodOptions: TokenProviderMethodOptions ;
public readonly name : string ;
public readonly permissions: GitHubAppPermissions ;
public readonly targetRule: TokenProviderTargetRule ;
Only applicable to TokenProviderLambdaCodeOptions.
Ensure that the lambda function architecture matches.
Name
Type
Description
name
string
No description.
public readonly name : string ;
public readonly ARM_64: ApplicationArchitecture ;
public readonly X86_64: ApplicationArchitecture ;
Name
Description
create
No description.
import { GitHubApp } from '@catnekaise/ghrawel'
GitHubApp . create ( name : string , appId : number )
Name
Type
Description
appId
number
No description.
name
string
No description.
public readonly appId : number ;
public readonly name : string ;
TokenProviderConfigurator
This class may see some breaking changes but the intent is to stabilize, be made abstract and available as input on TokenProviderConfiguration
.
public createApiResource ( api : IRestApi , name : string , endpoint : TokenProviderEndpoint ) : Resource
Type: aws-cdk-lib.aws_apigateway.IRestApi
public createIntegrationOptions ( settings : TokenProviderConfiguratorIntegrationOptionsContext ) : LambdaIntegrationOptions
public createMethodOptions ( input : TokenProviderConfiguratorMethodOptionsContext ) : MethodOptions
Name
Description
create
No description.
import { TokenProviderConfigurator } from '@catnekaise/ghrawel'
TokenProviderConfigurator . create ( )
Name
Type
Description
integrationResponses
aws-cdk-lib.aws_apigateway.IntegrationResponse[]
No description.
integrationResponses
Required
public readonly integrationResponses: IntegrationResponse [ ] ;
Type: aws-cdk-lib.aws_apigateway.IntegrationResponse[]
Name
Description
useDefault
Use this to configure a token provider at /x/<provider-name>/{owner}/{repo}
.
useOwner
Use this to configure a token provider at /x/<provider-name>/{owner}
or /x/<provider-name>/<owner>
.
import { TokenProviderEndpoint } from '@catnekaise/ghrawel'
TokenProviderEndpoint . useDefault ( )
Use this to configure a token provider at /x/<provider-name>/{owner}/{repo}
.
import { TokenProviderEndpoint } from '@catnekaise/ghrawel'
TokenProviderEndpoint . useOwner ( owner ?: string )
Use this to configure a token provider at /x/<provider-name>/{owner}
or /x/<provider-name>/<owner>
.
public readonly isOwnerEndpoint: boolean ;
public readonly type : TokenProviderEndpointType ;
public readonly owner : string ;
public readonly repo : string ;
import { TokenProviderLambdaCode } from '@catnekaise/ghrawel'
new TokenProviderLambdaCode ( )
import { TokenProviderLambdaCode } from '@catnekaise/ghrawel'
TokenProviderLambdaCode . defaultGo ( options ?: TokenProviderLambdaCodeOptions )
import { TokenProviderLambdaCode } from '@catnekaise/ghrawel'
TokenProviderLambdaCode . dotnet ( options ?: TokenProviderLambdaCodeOptions )
TokenProviderPathStrategy
Name
Description
anyRepository
Grants permission to /x/<provider-name>/*
.
policyVarRepository
Grants permission to /x/<provider-name>/${aws:PrincipalTag/repository}
.
policyVarRepositoryOwner
Grants permission to /x/<provider-name>/${aws:PrincipalTag/repository_owner}
or /x/<provider-name>/${aws:PrincipalTag/repository_owner}/<repo>
.
selectOwner
Grants permission to /x/<provider-name>/<owner>
.
selectRepositories
Grants permission for each specified repo /x/<provider-name>/<owner>/<repo>
.
import { TokenProviderPathStrategy } from '@catnekaise/ghrawel'
TokenProviderPathStrategy . anyRepository ( )
Grants permission to /x/<provider-name>/*
.
import { TokenProviderPathStrategy } from '@catnekaise/ghrawel'
TokenProviderPathStrategy . policyVarRepository ( )
Grants permission to /x/<provider-name>/${aws:PrincipalTag/repository}
.
import { TokenProviderPathStrategy } from '@catnekaise/ghrawel'
TokenProviderPathStrategy . policyVarRepositoryOwner ( repositories : string)
Grants permission to /x/<provider-name>/${aws:PrincipalTag/repository_owner}
or /x/<provider-name>/${aws:PrincipalTag/repository_owner}/<repo>
.
import { TokenProviderPathStrategy } from '@catnekaise/ghrawel'
TokenProviderPathStrategy . selectOwner ( owner : string )
Grants permission to /x/<provider-name>/<owner>
.
import { TokenProviderPathStrategy } from '@catnekaise/ghrawel'
TokenProviderPathStrategy . selectRepositories ( owner : string , repositories : string)
Grants permission for each specified repo /x/<provider-name>/<owner>/<repo>
.
pathTargetsRepositories
Required
public readonly pathTargetsRepositories: boolean ;
public readonly repositories: string [ ] ;
public readonly type : TokenProviderPathStrategyType ;
public readonly owner : string ;
public readonly policyVar: TokenProviderPathPolicyVariable ;
import { TokenProviderTargetRule } from '@catnekaise/ghrawel'
TokenProviderTargetRule . allowOwner ( )
import { TokenProviderTargetRule } from '@catnekaise/ghrawel'
TokenProviderTargetRule . atLeastOne ( )
repositorySelectionMode
Required
public readonly repositorySelectionMode: RepositorySelectionMode ;
public getAppIdForAppName ( name ?: string ) : number
public grantAccess ( principal : IPrincipal ) : Grant
Type: aws-cdk-lib.aws_iam.IPrincipal
public readonly secretsPrefix: string ;
public readonly secretsStorage: GitHubAppSecretsStorage ;
public grantExecute ( role : IRole , repo : string , owner ?: string ) : Grant
Use this to grant access to the token provider.
Type: aws-cdk-lib.aws_iam.IRole
grantExecuteGitHubActionsAbac
public grantExecuteGitHubActionsAbac ( role : IRole , settings : TokenProviderActionsIdentitySettings ) : Grant
use this to grant access to the token provider when the role is assumed via Cognito Identity.
Type: aws-cdk-lib.aws_iam.IRole
public newTokenProvider ( name : string , configuration : NewTokenProviderConfiguration ) : ITokenProvider
Name
Description
READ
No description.
WRITE
No description.
ADMIN
No description.
Name
Description
AT_LEAST_ONE
Allows targeting of any individual or multiple repos, but NOT the organization.
ALLOW_OWNER
Allows targeting of any individual or multiple repos and the organization/user.
Allows targeting of any individual or multiple repos, but NOT the organization.
Allows targeting of any individual or multiple repos and the organization/user.
TokenProviderEndpointType
TokenProviderPathPolicyVariable
TokenProviderPathStrategyType