Skip to content

Commit

Permalink
fix(eks): overly permissive trust policies (#25473)
Browse files Browse the repository at this point in the history
The *CreationRole* and the *default MastersRole* use the account root principal in their trust policy, which is overly permissive. Instead, use the specific lambda handler roles that need it, and remove the default masters role.

BREAKING CHANGE: A masters role is no longer provisioned by default. Use the `mastersRole` property to explicitly pass a role that needs cluster access. In addition, the creation role no longer allows any identity (with the appropriate `sts:AssumeRole` permissions) to assume it. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
iliapolo committed May 15, 2023
1 parent 16ae335 commit 51f0193
Show file tree
Hide file tree
Showing 538 changed files with 17,161 additions and 18,997 deletions.

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsCompleteResponse, OnEventResponse } from '../../../custom-resources/lib/provider-framework/types';
import { EksClient, ResourceEvent, ResourceHandler } from './common';
import { IsCompleteResponse, OnEventResponse } from '../../../custom-resources/lib/provider-framework/types';
export declare class ClusterResourceHandler extends ResourceHandler {
get clusterName(): string;
private readonly newProps;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-disable no-console */

// eslint-disable-next-line import/no-extraneous-dependencies
import { IsCompleteResponse, OnEventResponse } from '../../../custom-resources/lib/provider-framework/types';
// eslint-disable-next-line import/no-extraneous-dependencies
import * as aws from 'aws-sdk';
import { EksClient, ResourceEvent, ResourceHandler } from './common';
import { compareLoggingProps } from './compareLogging';
import { IsCompleteResponse, OnEventResponse } from '../../../custom-resources/lib/provider-framework/types';


const MAX_CLUSTER_NAME_LEN = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsCompleteResponse, OnEventResponse } from '../../../custom-resources/lib/provider-framework/types';
import * as aws from 'aws-sdk';
import { IsCompleteResponse, OnEventResponse } from '../../../custom-resources/lib/provider-framework/types';
export interface EksUpdateId {
/**
* If this field is included in an event passed to "IsComplete", it means we
Expand Down
Loading

0 comments on commit 51f0193

Please sign in to comment.