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

feat(kuma-cp) Initial token generator with HTTP Server on localhost #326

Merged
merged 7 commits into from
Oct 16, 2019

Conversation

jakubdyszkiewicz
Copy link
Contributor

Summary

Implementation of initial token generator. I added the server that generates JWT token for dataplanes. It listens on http://127.0.0.1:5679. Private key for JWT token is generated on CP startup.

Tokens are not yet used.

pkg/config/app/kuma-cp/config.go Outdated Show resolved Hide resolved
pkg/config/app/kuma-cp/kuma-cp.defaults.yaml Outdated Show resolved Hide resolved
pkg/config/sds/config.go Outdated Show resolved Hide resolved
pkg/core/secrets/manager/auth_private_key.go Outdated Show resolved Hide resolved
pkg/sds/auth/interfaces.go Outdated Show resolved Hide resolved
pkg/sds/auth/universal/authenticator.go Outdated Show resolved Hide resolved
pkg/sds/auth/universal/generator.go Outdated Show resolved Hide resolved
pkg/sds/server/initial_token_server.go Outdated Show resolved Hide resolved
pkg/sds/server/initial_token_server.go Outdated Show resolved Hide resolved
pkg/sds/server/server.go Outdated Show resolved Hide resolved
Copy link
Contributor

@yskopets yskopets left a comment

Choose a reason for hiding this comment

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

Should we consider Token Issuer per Mesh (similarly to CA per Mesh) ?

pkg/config/token-server/config.go Outdated Show resolved Hide resolved
pkg/config/token-server/config.go Outdated Show resolved Hide resolved
pkg/config/token-server/config.go Outdated Show resolved Hide resolved
pkg/tokens/builtin/issuer/signing_key.go Outdated Show resolved Hide resolved
pkg/tokens/builtin/issuer/signing_key.go Show resolved Hide resolved
pkg/tokens/builtin/issuer/issuer.go Show resolved Hide resolved
pkg/tokens/builtin/issuer/issuer.go Outdated Show resolved Hide resolved
pkg/core/bootstrap/bootstrap.go Outdated Show resolved Hide resolved
pkg/sds/auth/universal/auth_test.go Outdated Show resolved Hide resolved
pkg/sds/auth/universal/authenticator.go Outdated Show resolved Hide resolved
@jakubdyszkiewicz
Copy link
Contributor Author

Should we consider Token Issuer per Mesh (similarly to CA per Mesh) ?

Do we really need it though? I feel like this is an improvement that can be added later on.

Comment on lines 38 to 39
if rt.Config().Environment != config_core.KubernetesEnvironment {
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of these lines ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I did a mistake when merging/rebasing. Fixed


func (a *DataplaneTokenServer) Start(stop <-chan struct{}) error {
mux := http.NewServeMux()
mux.HandleFunc("/token", a.handleIdentityRequest)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would expect POST /tokens

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@jakubdyszkiewicz jakubdyszkiewicz merged commit e5e4657 into master Oct 16, 2019
@jakubdyszkiewicz jakubdyszkiewicz deleted the feature/initial-token branch February 28, 2020 08:56
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.

None yet

2 participants