Skip to content
  • Privacy Policy
  • Privacy Policy
High DA, PA, DR Guest Blogs Posting Website – Pcp247.com

High DA, PA, DR Guest Blogs Posting Website – Pcp247.com

Pcp247.com

  • Computer
  • Fashion
  • Business
  • Lifestyle
  • Automobile
  • Login
  • Register
  • Technology
  • Travel
  • Post Blog
  • Toggle search form
  • Network-Attached Storage (NAS) Market – Trends, Growth, including COVID19 Impact, Forecast Business
  • 5 Techniques to Mend from a Really Significant, Controlling Father or mother Health and Fitness
  • AWS 7 days in Assessment – Automate DLQ Redrive for SQS, Lambda Supports Ruby 3.2, and More – June 12, 2023 Computer
  • Tri-State Weather: Tornado Watches and Warnings Computer
  • digital agency Brisbane *Post Types
  • Fresh Meat Packaging Market Size, Share & Trends Analysis Report News
  • Inside Briansclub: A Comprehensive Guide to the Dark Web’s Leading Carding Forum Technology
  • Unveiling the Secrets: How to Acquire a 1XBET Promo Code for Enhanced Betting Experiences Social Media

CloudFormation Point-of-Change Compliance: Hooks First Impressions

Posted on February 11, 2023 By Editorial Team

[ad_1]

Intro 

Security and compliance controls are an important part of the software development life cycle.  When organizations and teams move software delivery from months to hours, the processes related to compliance evaluation can become a bottleneck for delivery.  In his article, “Compliance in a DevOps Culture,” Carl Nygard outlines different approaches teams can take to address these compliance bottlenecks within large organizations. One of those strategies is Point-of-Change compliance. This approach seeks to validate compliance controls as close as possible to deploy those changes. Applying this approach to cloud infrastructure changes via CloudFormation will require reviewing templates and changesets before execution. Let’s review some of the tools available for implementing Point-of-Change compliance with CloudFormation. 

Gaps within existing compliance tools

Numerous policy-as-code tools exist to evaluate CloudFormation templates automatically. Tools such as cfn_nag, Guard, Regula, or OPA work at the template level. They consume an existing YAML or JSON document and provide feedback to the developer if they passed the compliance rules. The benefit is straightforward: compliance rules are codified, and templates are vetted against them before being used. Or are they? Since these tools are executed outside of the CloudFormation stack lifecycle, enforcement of those results is dependent on pipeline integrations and process convention within an organization. There is no technical roadblock to launching a CloudFormation stack that has failed those automated compliance checks. Therefore, none of these hit the ideal mark for being able to enforce Point-of-Change compliance.

Can we do better? Using the AWS Cloud Development Kit (CDK), Om Prakash Jha outlines how to use aspects to enforce compliance requirements. The compliance rules are part of the CDK lifecycle and get evaluated prior to CDK’s synthesis into a CloudFormation template. This is a good model for Point-of-Change compliance. The rules get evaluated alongside the change and enforced when we execute the update. However, since the compliance rules are integrated alongside the infrastructure code, the rules may be vulnerable to being disabled by the infrastructure change’s author.

The best way to enforce Point-of-Change compliance would be to hook directly into the lifecycle of the CloudFormation service. Such an approach would allow compliance rules to exist separate from the change and tied as close as possible to executing those changes.

Introduce Hooks

While other AWS services have provided lifecycle hooks(e.g., EC2 Autoscaling Groups), CloudFormation interactions were previously restricted to actions directly on the stack (create, update, rollback, delete) and cfn-signal for specific resources. AWS is updating this with the launch of CloudFormation Hooks.

CloudFormation Hooks allow developers to inject code into the CloudFormation lifecycle. A hook has several different attributes that configure how it interacts with a stack. A hook is executed based on the combination of target resources (e.g., AWS::ECR::Repository), invocation points (before provisioning), and actions (create, update, delete). When those three criteria are met, CloudFormation will invoke the handler of the hook. The handler receives information about the stack and target resource, which it can then use to either pass or fail the resource. If a hook invocation fails, the stack can either fail or log the warning depending on the configuration.

Using hooks improves the ability to implement Point-of-Change compliance, as resources can be checked before provisioning directly within the CloudFormation lifecycle. A sample hook is explored for setting compliance rules on the AWS::ECR::Repository resource below.

Example Hook for Compliance

Consider the following compliance rules around an AWS::ECR::Repository:

  1. All ECR repos must use KMS encryption
  2. All ECR repos must enforce immutable tags
  3. All ECR repos must scan images on push

These rules can be implemented in a CloudFormation Hook, ensuring that any repo resource created via CloudFormation has the appropriate attributes set. A partial hook implementation for these three conditions is provided below. The full example is available on Github.

handlers.py
@hook.handler(HookInvocationPoint.CREATE_PRE_PROVISION)
def pre_create_handler(
        session: Optional[SessionProxy],
        request: HookHandlerRequest,
        callback_context: MutableMapping[str, Any],
        type_configuration: TypeConfigurationModel
) -> ProgressEvent:
    target_model = request.hookContext.targetModel
    target_name = request.hookContext.targetName
    progress: ProgressEvent = ProgressEvent(
        status=OperationStatus.IN_PROGRESS
    )

    try:
        # Verify this is a ECR Repo resource
        if "AWS::ECR::Repository" == target_name:
            resource_properties = target_model.get("resourceProperties")

            error_messages = []

            # Check Encryption
            repo_encryption_type = resource_properties.get("EncryptionConfiguration", ).get("EncryptionType")
            if repo_encryption_type != "KMS":
                error_messages.append("EncryptionType must be KMS")

            # Check Scan on Push
            scan_on_push = resource_properties.get("ImageScanningConfiguration", ).get("ScanOnPush")
            if scan_on_push != "true":
                error_messages.append("ScanOnPush must be enabled")

            # Check Image Tag Mutability
            image_tag_mutability = resource_properties.get("ImageTagMutability")
            if image_tag_mutability != "IMMUTABLE":
                error_messages.append("ImageTagMutability must be IMMUTABLE")

            if error_messages:
                progress.status = OperationStatus.FAILED
                progress.message = "\n".join(error_messages)
                progress.errorCode = HandlerErrorCode.NonCompliant
            else:
                progress.status = OperationStatus.SUCCESS
                progress.message = "No issues found"
        else:
            raise exceptions.InvalidRequest(f"Unknown target type: target_name")
    except TypeError as e:
        raise exceptions.InternalFailure(f"was not expecting type e")

    return progress

The hook implementation is invoked before creating each AWS::ECR::Repository resource. The resource properties are available for inspection and checked for compliance with each of our three rules above. If any are not set as expected, the hook returns a failed status and appropriate error message, presented to the user in stack events (Figure 1). 

CloudFormation Hook Details

Figure 1

 

With the use of Hooks, enforcement of these compliance rules occurs immediately before creating the resources. Additional hooks can be written for other AWS resources to meet the expectations of the compliance organization. As shown above, each hook is tailored to the specific CloudFormation resource for which it is invoked. 

Looking ahead

The launch of Hooks fills a gap in the ability to enforce Point-of-Change compliance with infrastructure automation using CloudFormation. The barrier to entry in using this as a compliance tool is still pretty high. Compliance rules must be written in Python or Java and targeted to specific resources. Teams with rules developed for existing tools that review templates will have to rewrite those into hooks or utilize mixed strategies. One solution might be to have analysis tools sign a scan of a template and then use a hook to verify that scan at the Point-of-Change. In the future, AWS could also expand Hooks to support rule definition using open-source rule engines, such as Rego, to reduce the coding effort for compliance teams to write hooks.

Conclusion

With CloudFormation Hooks, organizations can now push compliance rules closer to Point-of-Change, improving the effectiveness of the compliance process while eliminating roadblocks for developers. Check out the documentation and write your first hook today!

Stelligent Amazon Pollycast

Voiced by Amazon Polly

[ad_2]

Source link

Computer Tags:CloudFormation, Compliance, Hooks, Impressions, PointofChange

Post navigation

Previous Post: Introducing The Audemars ROC Split-Seconds Chronograph GMT
Next Post: What is Primal Scream Therapy (Does Screaming Relieve Stress?)

Related Posts

  • Pre-Owned Picks: Watches Born From Watches & Wonders Computer
  • Gold bars, 98 Rolex watches awarded to employees at this Computer
  • Amazfit Unveils Upcoming Release Of Pop 3S, Its Largest Smartwatch Computer
  • ‘Promising engineer’ became top drug dealer with expensive taste Computer
  • 500 Computer
  • Kids’ Smartwatch Market (Exclusive Report) Size 2023, Growth, specific challenges, Computer

lc_banner_enterprise_1

Top 30 High DA-PA Guest Blog Posting Websites 2024

Recent Posts

  • How AI Video Generators Are Revolutionizing Social Media Content
  • Expert Lamborghini Repair Services in Dubai: Preserving Luxury and Performance
  • What do you are familiar Oxycodone?
  • Advantages and Disadvantages of having White Sliding Door Wardrobe
  • The Future of Online Counseling: Emerging Technologies and their Impact on Mental Health Care

Categories

  • .NET
  • *Post Types
  • Amazon AppStream 2.0
  • Amazon Athena
  • Amazon Aurora
  • Amazon Bedrock
  • Amazon Braket
  • Amazon Chime SDK
  • Amazon CloudFront
  • Amazon CloudWatch
  • Amazon CodeCatalyst
  • Amazon CodeWhisperer
  • Amazon Comprehend
  • Amazon Connect
  • Amazon DataZone
  • Amazon Detective
  • Amazon DocumentDB
  • Amazon DynamoDB
  • Amazon EC2
  • Amazon EC2 Mac Instances
  • Amazon EKS Distro
  • Amazon Elastic Block Store (Amazon EBS)
  • Amazon Elastic Container Registry
  • Amazon Elastic Container Service
  • Amazon Elastic File System (EFS)
  • Amazon Elastic Kubernetes Service
  • Amazon ElastiCache
  • Amazon EMR
  • Amazon EventBridge
  • Amazon Fraud Detector
  • Amazon FSx
  • Amazon FSx for Lustre
  • Amazon FSx for NetApp ONTAP
  • Amazon FSx for OpenZFS
  • Amazon FSx for Windows File Server
  • Amazon GameLift
  • Amazon GuardDuty
  • Amazon Inspector
  • Amazon Interactive Video Service
  • Amazon Kendra
  • Amazon Lex
  • Amazon Lightsail
  • Amazon Location
  • Amazon Machine Learning
  • Amazon Managed Grafana
  • Amazon Managed Service for Apache Flink
  • Amazon Managed Service for Prometheus
  • Amazon Managed Streaming for Apache Kafka (Amazon MSK)
  • Amazon Managed Workflows for Apache Airflow (Amazon MWAA)
  • Amazon MemoryDB for Redis
  • Amazon Neptune
  • Amazon Omics
  • Amazon OpenSearch Service
  • Amazon Personalize
  • Amazon Pinpoint
  • Amazon Polly
  • Amazon QuickSight
  • Amazon RDS
  • Amazon RDS Custom
  • Amazon Redshift
  • Amazon Route 53
  • Amazon S3 Glacier
  • Amazon S3 Glacier Deep Archive
  • Amazon SageMaker
  • Amazon SageMaker Canvas
  • Amazon SageMaker Data Wrangler
  • Amazon SageMaker JumpStart
  • Amazon SageMaker Studio
  • Amazon Security Lake
  • Amazon Simple Email Service (SES)
  • Amazon Simple Notification Service (SNS)
  • Amazon Simple Queue Service (SQS)
  • Amazon Simple Storage Service (S3)
  • Amazon Transcribe
  • Amazon Translate
  • Amazon VPC
  • Amazon WorkSpaces
  • Analytics
  • Announcements
  • Application Integration
  • Application Services
  • Artificial Intelligence
  • Auto Scaling
  • Automobile
  • AWS Amplify
  • AWS Application Composer
  • AWS Application Migration Service
  • AWS AppSync
  • AWS Audit Manager
  • AWS Backup
  • AWS Chatbot
  • AWS Clean Rooms
  • AWS Cloud Development Kit
  • AWS Cloud Financial Management
  • AWS Cloud9
  • AWS CloudTrail
  • AWS CodeArtifact
  • AWS CodeBuild
  • AWS CodePipeline
  • AWS Config
  • AWS Control Tower
  • AWS Cost and Usage Report
  • AWS Data Exchange
  • AWS Database Migration Service
  • AWS DataSync
  • AWS Direct Connect
  • AWS Fargate
  • AWS Glue
  • AWS Glue DataBrew
  • AWS Health
  • AWS HealthImaging
  • AWS Heroes
  • AWS IAM Access Analyzer
  • AWS Identity and Access Management (IAM)
  • AWS IoT Core
  • AWS IoT SiteWise
  • AWS Key Management Service
  • AWS Lake Formation
  • AWS Lambda
  • AWS Management Console
  • AWS Marketplace
  • AWS Outposts
  • AWS re:Invent
  • AWS SDK for Java
  • AWS Security Hub
  • AWS Serverless Application Model
  • AWS Service Catalog
  • AWS Snow Family
  • AWS Snowball Edge
  • AWS Step Functions
  • AWS Supply Chain
  • AWS Support
  • AWS Systems Manager
  • AWS Toolkit for AzureDevOps
  • AWS Toolkit for JetBrains IntelliJ IDEA
  • AWS Toolkit for JetBrains PyCharm
  • AWS Toolkit for JetBrains WebStorm
  • AWS Toolkit for VS Code
  • AWS Training and Certification
  • AWS Transfer Family
  • AWS Trusted Advisor
  • AWS Wavelength
  • AWS Wickr
  • AWS X-Ray
  • Best Practices
  • Billing & Account Management
  • Business
  • Business Intelligence
  • Compliance
  • Compute
  • Computer
  • Contact Center
  • Containers
  • CPG
  • Customer Enablement
  • Customer Solutions
  • Database
  • Dating
  • Developer Tools
  • DevOps
  • Education
  • Elastic Load Balancing
  • End User Computing
  • Events
  • Fashion
  • Financial Services
  • Game
  • Game Development
  • Gateway Load Balancer
  • General News
  • Generative AI
  • Generative BI
  • Graviton
  • Health and Fitness
  • Healthcare
  • High Performance Computing
  • Home Decor
  • Hybrid Cloud Management
  • Industries
  • Internet of Things
  • Kinesis Data Analytics
  • Kinesis Data Firehose
  • Launch
  • Lifestyle
  • Management & Governance
  • Management Tools
  • Marketing & Advertising
  • Media & Entertainment
  • Media Services
  • Messaging
  • Migration & Transfer Services
  • Migration Acceleration Program (MAP)
  • MySQL compatible
  • Networking & Content Delivery
  • News
  • Open Source
  • PostgreSQL compatible
  • Public Sector
  • Quantum Technologies
  • RDS for MySQL
  • RDS for PostgreSQL
  • Real Estate
  • Regions
  • Relationship
  • Research
  • Retail
  • Robotics
  • Security
  • Security, Identity, & Compliance
  • Serverless
  • Social Media
  • Software
  • Storage
  • Supply Chain
  • Technical How-to
  • Technology
  • Telecommunications
  • Thought Leadership
  • Travel
  • Week in Review

#digitalsat #digitalsattraining #satclassesonline #satexamscore #satonline Abortion AC PCB Repairing Course AC PCB Repairing Institute AC Repairing Course AC Repairing Course In Delhi AC Repairing Institute AC Repairing Institute In Delhi Amazon Analysis AWS Bird Blog business Care drug Eating fitness Food Growth health Healthcare Industry Trends Kheloyar kheloyar app kheloyar app download kheloyar cricket NPR peacock.com/tv peacocktv.com/tv People Review Share Shots site Solar Module Distributor Solar Panel Distributor solex distributor solplanet inverter distributor U.S Week

  • Network-Attached Storage (NAS) Market – Trends, Growth, including COVID19 Impact, Forecast Business
  • 5 Techniques to Mend from a Really Significant, Controlling Father or mother Health and Fitness
  • AWS 7 days in Assessment – Automate DLQ Redrive for SQS, Lambda Supports Ruby 3.2, and More – June 12, 2023 Computer
  • Tri-State Weather: Tornado Watches and Warnings Computer
  • digital agency Brisbane *Post Types
  • Fresh Meat Packaging Market Size, Share & Trends Analysis Report News
  • Inside Briansclub: A Comprehensive Guide to the Dark Web’s Leading Carding Forum Technology
  • Unveiling the Secrets: How to Acquire a 1XBET Promo Code for Enhanced Betting Experiences Social Media

Latest Posts

  • How AI Video Generators Are Revolutionizing Social Media Content
  • Expert Lamborghini Repair Services in Dubai: Preserving Luxury and Performance
  • What do you are familiar Oxycodone?
  • Advantages and Disadvantages of having White Sliding Door Wardrobe
  • The Future of Online Counseling: Emerging Technologies and their Impact on Mental Health Care

Gallery

Quick Links

  • Login
  • Register
  • Contact us
  • Post Blog
  • Privacy Policy

Powered by PressBook News WordPress theme