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

implement auth in jump server #1524

Merged

Conversation

SimoneDutto
Copy link
Contributor

Description

In this PR we implement the authentication and authorization checks inside of the ssh jump server.
To do so:

  • we require an ssh manager, able to interact with Jimm's state
  • a new method in the ssh key manager to verify a public key fingerprint (the implementation will be done in a follow-up pr)

@SimoneDutto SimoneDutto requested a review from a team as a code owner January 15, 2025 11:14
Copy link
Contributor

@kian99 kian99 left a comment

Choose a reason for hiding this comment

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

quick review, need to go over it again.

internal/jimm/ssh/ssh.go Outdated Show resolved Hide resolved
internal/ssh/ssh.go Outdated Show resolved Hide resolved
internal/jimm/ssh/ssh.go Outdated Show resolved Hide resolved
internal/jimm/ssh/ssh.go Outdated Show resolved Hide resolved
internal/ssh/ssh.go Outdated Show resolved Hide resolved
internal/ssh/ssh.go Outdated Show resolved Hide resolved
internal/testutils/jimmtest/mocks/jimm_ssh_mock.go Outdated Show resolved Hide resolved
@SimoneDutto SimoneDutto force-pushed the JUJU-7349/implement-auth-in-jump branch from 71ce8b2 to c587916 Compare January 16, 2025 10:51
@SimoneDutto SimoneDutto requested a review from kian99 January 16, 2025 10:52
Copy link
Contributor

@ale8k ale8k left a comment

Choose a reason for hiding this comment

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

confused by the ssh manager, will wait for update

internal/jimm/ssh/ssh.go Show resolved Hide resolved
internal/ssh/ssh.go Outdated Show resolved Hide resolved
@SimoneDutto SimoneDutto requested a review from ale8k January 16, 2025 13:54
@SimoneDutto
Copy link
Contributor Author

confused by the ssh manager, will wait for update

as discussed, the manager methods' implementation will be done in a followup. This is just the skeleton to satisfy the interface for the creation of the jump server

Copy link
Contributor

@kian99 kian99 left a comment

Choose a reason for hiding this comment

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

lgtm, I'm okay with the sshManager wrapping the others with the assumption that it will grow to do more logic in the future. If it turns out not to, we can get rid of it.

@SimoneDutto
Copy link
Contributor Author

lgtm, I'm okay with the sshManager wrapping the others with the assumption that it will grow to do more logic in the future. If it turns out not to, we can get rid of it.

yeah, same

internal/ssh/ssh.go Outdated Show resolved Hide resolved
@SimoneDutto SimoneDutto force-pushed the JUJU-7349/implement-auth-in-jump branch from 51f5b7b to 9c2fe1b Compare January 17, 2025 09:36
// AddrFromModelUUID is the method to resolve the address of the controller to contact given the model UUID.
AddrFromModelUUID(ctx context.Context, user openfga.User, modelUUID string) (string, error)
AddrFromModelUUID(ctx context.Context, user *openfga.User, modelTag names.ModelTag) (string, error)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice

Copy link
Contributor

@ale8k ale8k left a comment

Choose a reason for hiding this comment

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

lgtm just one godoc

@SimoneDutto SimoneDutto force-pushed the JUJU-7349/implement-auth-in-jump branch from 559c8a7 to 32a7aaa Compare January 17, 2025 09:54
@SimoneDutto SimoneDutto merged commit f0dc0fc into canonical:v3 Jan 17, 2025
4 checks passed
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.

3 participants