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

Certificate-Based Authentication #10

Open
mohammed90 opened this issue Mar 28, 2022 · 2 comments · May be fixed by #25
Open

Certificate-Based Authentication #10

mohammed90 opened this issue Mar 28, 2022 · 2 comments · May be fixed by #25
Labels
authentication enhancement New feature or request help wanted Extra attention is needed

Comments

@mohammed90
Copy link
Collaborator

See:

@mohammed90 mohammed90 added help wanted Extra attention is needed authentication enhancement New feature or request labels Mar 28, 2022
@francislavoie
Copy link
Collaborator

We can probably plug into Caddy's PKI app to do this.

Snippet to get started from Caddy's acme_server module:

	// get a reference to the configured CA
	appModule, err := ctx.App("pki")
	if err != nil {
		return err
	}
	pkiApp := appModule.(*caddypki.PKI)
	ca, err := pkiApp.GetCA(ctx, ash.CA)
	if err != nil {
		return err
	}

Then from there we'd need to adjust caddypki.CA.NewAuthority() to support configuring the CA for SSH use, i.e. by adding authority.WithSSH*() options, then we can call authority.SignSSH and spit out the result to whoever needs it. When you need to do auth for a new connection, I think we can call authority.GetSSHRoots() then validate it with x/crypto/ssh as you normally would (not sure how SSH key verification would work, haven't dug into how caddy-ssh does that yet)

@gc-ss
Copy link

gc-ss commented Mar 30, 2022

I am especially interested in ensuring that revocation works as expected. Of real interest would be seeing if we can boot/force logout any sessions users are logged into already at time of revocation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants