Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SRCE (Secure Research Collaborative Environment) support
Add full SRCE infrastructure stack support for deploying into IT-provided VPCs
(3-VPC architecture: Application, Database, and Compute).
New modules:
srce_network.py-- Network stacks (C4SRCENetwork,C4SRCEDBNetwork,C4SRCEComputeNetwork) that export IT-provided VPC/subnet IDs and createsecurity groups with cross-VPC rules, enabling downstream stacks to use the
standard
ImportValuepattern unchanged.srce_datastore.py-- SRCE datastore (C4SRCEDatastore) targeting theDatabase VPC; patches
IAMStackNameParameterto default to the sharedc4-iam-main-stack.srce_ecs.py-- SRCE ECS application (C4SRCEECSApplication) targetingthe Application VPC with config-driven VPC CIDR.
srce_ecs_blue_green.py-- SRCE blue/green ECS variant (SRCEECSBlueGreen).srce_sentieon.py-- SRCE Sentieon license server (C4SRCESentieonSupport)in the Application VPC with cross-VPC security rules for the Compute VPC.
srce_redis.py-- SRCE Redis (C4SRCERedis) targeting the Database VPC.New config.json settings for SRCE deployments:
vpc.id,vpc.cidr,public.subnets,private.subnets,db.vpc.id,db.vpc.cidr,db.private.subnets,compute.vpc.id,compute.vpc.cidr,compute.private.subnets.Register all SRCE stacks in
alpha_stacks.py(srce-network,srce-network-db,srce-network-compute,srce-datastore,srce-ecs,srce-ecs-blue-green,srce-sentieon,srce-redis).Update
cli.pyto handle SRCE stack deployment:ALPHA_LEAF_STACKS.SRCE_STACKSlist and SRCE-specific parameter overrides using hardcodedecosystem-scoped stack names (
c4-iam-main-stack,c4-ecr-main-stack,c4-logging-main-stack) to avoid relying on ecosystem config resolution.--region us-east-1tocloudformation deploy.Fix ECS and blue/green subnet references to use
self.NETWORK_EXPORTS.PRIVATE_SUBNETS/
PUBLIC_SUBNETSinstead of hardcodedC4NetworkExportslists, so SRCE stacksonly reference the subnets that actually exist in the IT-provided VPC.
Add
C4SRCENetworkExports.PRIVATE_SUBNETS/PUBLIC_SUBNETSsized to theconfigured subnets from config.json.
Add
C4SRCEDatastoreBasetoconstants.pyandNames.srce_datastore_stack_name_object()to
names.pyfor SRCE-aware name generation.Update
setup-remaining-secretsto detect SRCE deployments (viavpc.idin config)and compute the correct RDS secret logical ID using the SRCE datastore prefix.
IAM policy hardening
Scope all IAM policies to least-privilege:
ecs_sqs_policy: Replacesqs:*with specific send/receive/delete actions;scope resource to
c4-*queues.ecs_es_policy: Replacees:*with specific HTTP actions; scope toc4*domains.
ecs_secret_manager_policy: ReplaceResource: '*'with scoped ARN(
c4-*secrets); removeGetResourcePolicy.ecs_access_policy: Replaceecs:*andelasticloadbalancing:*withenumerated actions.
ecs_log_policy: Scope resource from*toc4-*log groups/streams.ecs_ecr_policy: Split into two statements --GetAuthorizationTokenon*and image pull actions scoped to
c4-*repositories.ecs_cfn_policy: ScopeDescribeStackstoc4-*stacks; keepListStackson*.Fix
builds_secret_manager_arnto produce correct ARN format(
secret:nameinstead ofsecret:name:-*).