Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

authz: principal blacklist #669

Merged
merged 2 commits into from
Feb 7, 2019
Merged

authz: principal blacklist #669

merged 2 commits into from
Feb 7, 2019

Conversation

danielnorberg
Copy link
Contributor

@danielnorberg danielnorberg commented Feb 7, 2019

Hey, I just made a Pull Request!

Description

Allow blacklisting specific undesirable principals from authorizing.

Motivation and Context

Protect against users granting authorization access to principals like e.g. a global default CI/CD service account.

Those workflows would otherwise be modifiable by (more or less) any user, which is not intended.

Have you tested this? If so, how?

Checklist for PR author(s)

  • Changes are covered by unit test
  • All tests pass
  • Code coverage check passes
  • Error handling is tested
  • Errors are handled at the appropriate layer
  • Errors that cannot be handled where they occur are propagated
  • (optional) Changes are covered by system test
  • Relevant documentation updated
  • This PR has NO breaking change to public API
  • This PR has breaking change to public API and it is documented

Checklist for PR reviewer(s)

  • This PR has been incorporated in release note for the coming version
  • Risky changes introduced by this PR have been all considered

@danielnorberg danielnorberg force-pushed the authz-principal-blacklist branch 2 times, most recently from 2a66c34 to 6fc659a Compare February 7, 2019 05:10
@codecov
Copy link

codecov bot commented Feb 7, 2019

Codecov Report

Merging #669 into master will increase coverage by 0.05%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #669      +/-   ##
============================================
+ Coverage     83.01%   83.06%   +0.05%     
  Complexity     1659     1659              
============================================
  Files           163      163              
  Lines          7359     7371      +12     
  Branches        448      448              
============================================
+ Hits           6109     6123      +14     
+ Misses         1123     1121       -2     
  Partials        127      127

@codecov
Copy link

codecov bot commented Feb 7, 2019

Codecov Report

Merging #669 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #669      +/-   ##
============================================
+ Coverage     83.03%   83.06%   +0.02%     
  Complexity     1659     1659              
============================================
  Files           163      163              
  Lines          7358     7371      +13     
  Branches        448      448              
============================================
+ Hits           6110     6123      +13     
  Misses         1121     1121              
  Partials        127      127

Allow blacklisting specific undesirable principals.
@@ -472,7 +497,7 @@ static ServiceAccountUsageAuthorizer create(String serviceAccountUserRole,
String gsuiteUserEmail,
String serviceName,
String message,
List<String> administrators) {
List<String> administrators, List<String> blacklist) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make it to a new line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@danielnorberg
Copy link
Contributor Author

I guess https://github.com/spotify/styx/blob/master/doc/api.apib should also be updated

@honnix
Copy link
Member

honnix commented Feb 7, 2019

I will do that.

@honnix
Copy link
Member

honnix commented Feb 7, 2019

Let's take it in a separated PR though.

@honnix
Copy link
Member

honnix commented Feb 7, 2019

Take liberty merging it.

@honnix honnix merged commit a5e128f into master Feb 7, 2019
@honnix honnix deleted the authz-principal-blacklist branch February 7, 2019 12:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants