agent-claw: automated task changes

This commit is contained in:
daniel
2026-05-06 18:55:16 -05:00
parent 38905bb1e9
commit 732b00fb66
8494 changed files with 2018127 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
{
"targets": {
"java": {
"package": "software.amazon.awscdk.services.elasticloadbalancingv2.actions"
},
"dotnet": {
"namespace": "Amazon.CDK.AWS.ElasticLoadBalancingV2.Actions"
},
"python": {
"module": "aws_cdk.aws_elasticloadbalancingv2_actions"
}
}
}

View File

@@ -0,0 +1,73 @@
# Actions for AWS Elastic Load Balancing V2
This package contains integration actions for ELBv2. See the README of the `aws-cdk-lib/aws-elasticloadbalancingv2` library.
## Cognito
ELB allows for requests to be authenticated against a Cognito user pool using
the `AuthenticateCognitoAction`. For details on the setup's requirements,
read [Prepare to use Amazon
Cognito](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html#cognito-requirements).
Here's an example:
```ts
import { aws_certificatemanager as acm } from 'aws-cdk-lib';
declare const vpc: ec2.Vpc;
declare const certificate: acm.Certificate;
const lb = new elbv2.ApplicationLoadBalancer(this, 'LB', {
vpc,
internetFacing: true,
});
const userPool = new cognito.UserPool(this, 'UserPool');
const userPoolClient = new cognito.UserPoolClient(this, 'Client', {
userPool,
// Required minimal configuration for use with an ELB
generateSecret: true,
authFlows: {
userPassword: true,
},
oAuth: {
flows: {
authorizationCodeGrant: true,
},
scopes: [cognito.OAuthScope.EMAIL],
callbackUrls: [
`https://${lb.loadBalancerDnsName}/oauth2/idpresponse`,
],
},
});
const cfnClient = userPoolClient.node.defaultChild as cognito.CfnUserPoolClient;
cfnClient.addPropertyOverride('RefreshTokenValidity', 1);
cfnClient.addPropertyOverride('SupportedIdentityProviders', ['COGNITO']);
const userPoolDomain = new cognito.UserPoolDomain(this, 'Domain', {
userPool,
cognitoDomain: {
domainPrefix: 'test-cdk-prefix',
},
});
lb.addListener('Listener', {
port: 443,
certificates: [certificate],
defaultAction: new actions.AuthenticateCognitoAction({
userPool,
userPoolClient,
userPoolDomain,
next: elbv2.ListenerAction.fixedResponse(200, {
contentType: 'text/plain',
messageBody: 'Authenticated',
}),
}),
});
new CfnOutput(this, 'DNS', {
value: lb.loadBalancerDnsName,
});
```

View File

@@ -0,0 +1 @@
export * from './lib';

View File

@@ -0,0 +1 @@
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.AuthenticateCognitoAction=void 0,Object.defineProperty(exports,_noFold="AuthenticateCognitoAction",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lib").AuthenticateCognitoAction;return Object.defineProperty(exports,_noFold="AuthenticateCognitoAction",{enumerable:!0,configurable:!0,value}),value}});

View File

@@ -0,0 +1,83 @@
import type { Construct, IConstruct } from 'constructs';
import type * as cognito from '../../aws-cognito';
import * as elbv2 from '../../aws-elasticloadbalancingv2';
import type { Duration } from '../../core';
/**
* Properties for AuthenticateCognitoAction
*/
export interface AuthenticateCognitoActionProps {
/**
* What action to execute next
*
* Multiple actions form a linked chain; the chain must always terminate in a
* (weighted)forward, fixedResponse or redirect action.
*/
readonly next: elbv2.ListenerAction;
/**
* The Amazon Cognito user pool.
*/
readonly userPool: cognito.IUserPool;
/**
* The Amazon Cognito user pool client.
*/
readonly userPoolClient: cognito.IUserPoolClient;
/**
* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
*/
readonly userPoolDomain: cognito.IUserPoolDomain;
/**
* The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
*
* @default - No extra parameters
*/
readonly authenticationRequestExtraParams?: Record<string, string>;
/**
* The behavior if the user is not authenticated.
*
* @default UnauthenticatedAction.AUTHENTICATE
*/
readonly onUnauthenticatedRequest?: elbv2.UnauthenticatedAction;
/**
* The set of user claims to be requested from the IdP.
*
* To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
*
* @default "openid"
*/
readonly scope?: string;
/**
* The name of the cookie used to maintain session information.
*
* @default "AWSELBAuthSessionCookie"
*/
readonly sessionCookieName?: string;
/**
* The maximum duration of the authentication session.
*
* @default Duration.days(7)
*/
readonly sessionTimeout?: Duration;
/**
* Allow HTTPS outbound traffic to communicate with the IdP.
*
* Set this property to false if the IP address used for the IdP endpoint is identifiable
* and you want to control outbound traffic.
* Then allow HTTPS outbound traffic to the IdP's IP address using the listener's `connections` property.
*
* @default true
* @see https://repost.aws/knowledge-center/elb-configure-authentication-alb
*/
readonly allowHttpsOutbound?: boolean;
}
/**
* A Listener Action to authenticate with Cognito
*/
export declare class AuthenticateCognitoAction extends elbv2.ListenerAction {
private static config;
private readonly allowHttpsOutbound;
/**
* Authenticate using an identity provide (IdP) that is compliant with OpenID Connect (OIDC)
*/
constructor(options: AuthenticateCognitoActionProps);
bind(scope: Construct, listener: elbv2.IApplicationListener, associatingConstruct?: IConstruct | undefined): void;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AuthenticateCognitoAction=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_ec2_1=()=>{var tmp=require("../../aws-ec2");return aws_ec2_1=()=>tmp,tmp},elbv2=()=>{var tmp=require("../../aws-elasticloadbalancingv2");return elbv2=()=>tmp,tmp};class AuthenticateCognitoAction extends elbv2().ListenerAction{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticloadbalancingv2_actions.AuthenticateCognitoAction",version:"2.252.0"};static config(options){return{userPoolArn:options.userPool.userPoolArn,userPoolClientId:options.userPoolClient.userPoolClientId,userPoolDomain:options.userPoolDomain.domainName,authenticationRequestExtraParams:options.authenticationRequestExtraParams,onUnauthenticatedRequest:options.onUnauthenticatedRequest,scope:options.scope,sessionCookieName:options.sessionCookieName,sessionTimeout:options.sessionTimeout?.toSeconds().toString()}}allowHttpsOutbound;constructor(options){super({type:"authenticate-cognito",authenticateCognitoConfig:AuthenticateCognitoAction.config(options)},options.next);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticloadbalancingv2_actions_AuthenticateCognitoActionProps(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AuthenticateCognitoAction),error}this.allowHttpsOutbound=options.allowHttpsOutbound??!0,this.addRuleAction({type:"authenticate-cognito",authenticateCognitoConfig:{...AuthenticateCognitoAction.config(options),sessionTimeout:options.sessionTimeout?.toSeconds()}})}bind(scope,listener,associatingConstruct){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_elasticloadbalancingv2_IApplicationListener(listener)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}super.bind(scope,listener,associatingConstruct),this.allowHttpsOutbound&&listener.connections.allowToAnyIpv4(aws_ec2_1().Port.tcp(443),"Allow to IdP endpoint")}}exports.AuthenticateCognitoAction=AuthenticateCognitoAction;

View File

@@ -0,0 +1 @@
export * from './cognito-action';

View File

@@ -0,0 +1 @@
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.AuthenticateCognitoAction=void 0,Object.defineProperty(exports,_noFold="AuthenticateCognitoAction",{enumerable:!0,configurable:!0,get:()=>{var value=require("./cognito-action").AuthenticateCognitoAction;return Object.defineProperty(exports,_noFold="AuthenticateCognitoAction",{enumerable:!0,configurable:!0,value}),value}});