Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Create docs for upgrading to v4 #436

Closed
pingles opened this issue Nov 5, 2020 · 3 comments · Fixed by #444
Closed

Create docs for upgrading to v4 #436

pingles opened this issue Nov 5, 2020 · 3 comments · Fixed by #444
Milestone

Comments

@pingles
Copy link
Contributor

pingles commented Nov 5, 2020

There's been a number of breaking changes #435 #431 introduced recently.

Before releasing we'll need something in the upgrading doc and release notes to help people understand the changes. In particular, changes to when regexes are applied will affect running workloads.

@pingles pingles added this to the v4 milestone Nov 5, 2020
@leosunmo
Copy link
Contributor

leosunmo commented Nov 11, 2020

From #435

@leosunmo what do you think? Could you prep some examples of how the namespace regex behaved before, and now, and what the implications are please?

Looking back at my original issue I can't think of a scenario where the "new" process would result in more permissive behaviour, but potentially where it is less permissive after the ARN resolver is added.

First, to recap and to get something started for the 4.0 Upgrade guide.
Using the following scenario from the original ticket:

# namespace
annotations:
  iam.amazonaws.com/permitted: .*workloads/.*
# Kiam Server
--role-base-arn=arn:aws:iam::1234567890:role/workloads/
# pod
annotations:
  iam.amazonaws.com/role: my-amazing-role

Old behaviour, where role ARN is NOT resolved before rules are evaluated

Fails, since my-amazing-role != .*workloads/.*:

failed assuming role "my-amazing-role": namespace policy expression '.*workloads/.*' forbids role 'my-amazing-role'

New behaviour, where the role is fully expanded/resolved before rules are evaluated.

Passes, since role = role-base-arn + pod annotation:

arn:aws:iam::1234567890:role/workloads/my-amazing-role == .*workloads/.*
Success!


A scenario that would pass evaluation using the old resolver logic:

# namespace
annotations:
  iam.amazonaws.com/permitted: ^red-role$
# Kiam Server
--role-base-arn=arn:aws:iam::1234567890:role/workloads/
# pod
annotations:
  iam.amazonaws.com/role: red-role

Not very realistic, or likely to actually affect anyone, but this would currently pass, but fail using the new evaluation implementation.

@leosunmo
Copy link
Contributor

Something that will have more impact on behaviour and backwards compatibility is #328 / #329

@stefansedich
Copy link
Contributor

#437 is also a breaking change.

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 a pull request may close this issue.

3 participants