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

Investigate alternative authentication mechanisms #756

Open
Danil-Grigorev opened this issue Sep 26, 2024 · 1 comment · May be fixed by #769
Open

Investigate alternative authentication mechanisms #756

Danil-Grigorev opened this issue Sep 26, 2024 · 1 comment · May be fixed by #769

Comments

@Danil-Grigorev
Copy link
Contributor

There are ways to reduce number of resources provisioned by agent for authentication in a Rancher cluster, by employing different authentication methods.

Investigate possible approaches.

Initial set:

  • Agent can issue a CSR request, which will be approved by Rancher to approve agent authentication, with a short spec.expirationSeconds value to allow revoking access.
  • Agent can connect via a single set of SA, RoleBinding and Role, using certificate and a token.
@Danil-Grigorev
Copy link
Contributor Author

Danil-Grigorev commented Oct 4, 2024

Upon investigation of the system-agent functionality, the initial approach required larger set of changes.

Number of required resources to allow access and execution of the system-agent plans in Rancher can be decreased to 2 per cluster machine.

  • 1 ServiceAccount per cluster
  • 1 Role per cluster (namespaced)
  • 1 RoleBinding per cluster
  • 2 Secrets per each cluster machine
    • 1 bootstrap Secret - connection info + kubeconfig
    • 1 system-agent Plan secret for the machine

Depending on the authentication model, this can be decreased further to 1 secret per machine. With usage of a TokenRequest, JWT expiration can be bound to the Plan secret lifecycle, allowing to remove bootstrap secret after node bootstrap completion.

Original: 25 resources for cluster with 5 machines
Current: 10 resources for cluster with 5 machines
TokenRequest based: 5 resources (plan secrets) for cluster with 5 machines.

Further improvements are possible only with changes to system-agent.

@Danil-Grigorev Danil-Grigorev linked a pull request Oct 4, 2024 that will close this issue
4 tasks
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 a pull request may close this issue.

1 participant