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

(temp) Enable hub authz and authn by default #514

Merged
merged 1 commit into from
May 10, 2024

Conversation

RedbackThomson
Copy link
Member

@RedbackThomson RedbackThomson commented May 10, 2024

Description of your changes

Prior to this change in spaces, authentication to a control plane supported using the the Kubernetes RBAC of the hub cluster. This meant as long as you used a cluster-admin to authenticate to the hub cluster, you could re-use those same credentials to authenticate to any of the control planes.

After that change, we expect that all authentication would go through Upbound IAM/RBAC by default. As such, ability to use Kubernetes RBAC was changed from opt-out to opt-in (breaking backward compatibility). However, Upbound IAM is only supported after connecting a space to cloud and the workflow for authenticating connected spaces is not yet ready. Therefore users cannot connect to any control planes from a spaces cluster running with the default values from version 1.3.1+.

This change opts-in to the Kubernetes RBAC values, rolling back to the previous default authn/authz model. These defaults should be reverted once support for connecting to control planes in connected spaces works end-to-end.

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

Running up space init --token-file=${userHome}/Keys/orchestration-build-b2e221ce1547.json v1.4.0-rc.0.40.gd33e4eb4 --set=account=upbound produces the following helm values:

$ helm get values spaces -n upbound-system
USER-SUPPLIED VALUES:
account: upbound
authentication:
  hubIdentities: true
authorization:
  hubRBAC: true
clusterType: kind

And up ctx can now connect to the control plane just like before:

$ up ctx
Kubeconfig context "kind-spaces-1.4" switched to: Upbound /kind-spaces-1.4/default/ctp1
$ k get pods
No resources found in default namespace.

@@ -167,6 +167,12 @@ func (c *initCmd) AfterApply(kongCtx *kong.Context, quiet config.QuietFlag) erro
pterm.Info.Println("Public ingress will be exposed")
}

// todo(redbackthomson): Remove these defaults once we can default to using
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'll also need to remove these defaults and fix the upgrade path to remove these when we make the switch (or documentation)

Copy link
Member Author

Choose a reason for hiding this comment

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

That is assuming we want to revert these defaults when people upgrade? I worry someone would end up relying on the RBAC and we'd break that accidentally when they upgrade.

Since this is technically a backward compatibility breaking change to the API, we can't revert it later unless the user explicitly allows us to do so.

@RedbackThomson RedbackThomson merged commit 2679399 into upbound:main May 10, 2024
7 checks passed
@RedbackThomson RedbackThomson deleted the temp-enable-rbac branch May 10, 2024 22:18
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.

4 participants