Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Nexus-611] feat: added permission boundary support #27

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

DavideNale
Copy link

Related Tasks

Does this PR relate to other tasks?
No

Depends on

Are there any other PRs that need to be merged first?
No

What

What changes have been made within this PR?
Added the support for permission boundary for managed_permission_sets and inline_permission_sets.

Why

Why are we submitting this PR? What is the context, engineering and business goals being satisfied by this PR?
Added the support for permission boundary to allow the attachment of restriction policies to allow the AU platform team to work on EU resources without infringing GDPR.

@DavideNale DavideNale requested a review from a team as a code owner February 18, 2025 10:27
Copy link
Contributor

@schattingh schattingh left a comment

Choose a reason for hiding this comment

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

Hi @DavideNale , I am receiving an error when testing this PR:

│ Error: Invalid variable validation condition
│ 
│   on .terraform/modules/org_sso/modules/sso/variables.tf line 18, in variable "managed_permission_sets":
│   18:     condition = alltrue([
│   19:       for ps in var.inline_permission_sets :
│   20:       ps.permissions_boundary == null ||
│   21:       (ps.permissions_boundary.managed_policy_arn != null) !=
│   22:       (ps.permissions_boundary.customer_managed_policy_reference != null)
│   23:     ])
│ 
│ The condition for variable "managed_permission_sets" must refer to var.managed_permission_sets in order to test incoming values.

name = string
description = string
inline_policy = string
session_duration = optional(string)
Copy link
Contributor

@schattingh schattingh Feb 26, 2025

Choose a reason for hiding this comment

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

Suggested change
session_duration = optional(string)
session_duration = optional(string, "PT12H")

Declaring this argument without a default is overriding the try statement in the resource block, resulting in all session durations being changed back to the default of PT1H1

Copy link
Contributor

@schattingh schattingh left a comment

Choose a reason for hiding this comment

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

I'm till getting an error:

│ Error: Attempt to get attribute from null value
│ 
│   on .terraform/modules/org_sso/modules/sso/variables.tf line 49, in variable "inline_permission_sets":
│   49:       (ps.permissions_boundary.customer_managed_policy_reference != null)
│     ├────────────────
│     │ ps.permissions_boundary is null
│ 
│ This value is null, so it does not have any attributes.

How are you testing this?

@DavideNale
Copy link
Author

@schattingh I'm testing it with nexus-config/platform-identity but I was doing a mistake while doing so.
Now it is correct and the tofu plan was successful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants