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

kes: add support for API key authentication #340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aead
Copy link
Member

@aead aead commented Mar 7, 2023

This commit adds support for KES<->KES authentication via API keys. Now, a KES edge server can authenticate to a KES server (stateful) via API keys - not just via TLS private key / certificate files.

@aead aead requested review from Praveenrajmani and taran-p March 7, 2023 15:09
@aead aead force-pushed the kes-keystore-apikey branch from 2e9ab7a to af404e0 Compare March 7, 2023 15:09
case config.APIKey != nil:
cert, err = kes.GenerateCertificate(config.APIKey)
if err != nil {
}

Choose a reason for hiding this comment

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

can we return the error here?

@kannappanr kannappanr requested a review from shtripat April 18, 2023 19:36
Copy link
Contributor

@shtripat shtripat left a comment

Choose a reason for hiding this comment

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

Minor comment. Also how to verify the changes?

if config.PrivateKey == "" {
return nil, errors.New("kes: no private key provided")
if config.APIKey != nil && (config.PrivateKey != "" || config.Certificate != "") {
return nil, errors.New("kes: ambiguous configuration: API key as well as mTLS private key and certificate provided")
Copy link
Contributor

Choose a reason for hiding this comment

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

API key as well as mTLS private key and/or certificate provided ?

@aead aead force-pushed the kes-keystore-apikey branch from af404e0 to effeabc Compare April 24, 2023 10:18
This commit adds support for KES<->KES authentication
via API keys. Now, a KES edge server can authenticate
to a KES server (stateful) via API keys - not just
via TLS private key / certificate files.

Signed-off-by: Andreas Auernhammer <[email protected]>
@aead aead force-pushed the kes-keystore-apikey branch from effeabc to 2170223 Compare April 24, 2023 10:19
@shtripat
Copy link
Contributor

Please resolve the conflict and add steps for verification. I feel we can add a wiki for the this mechanism of API keys authentication, right?

@allanrogerr
Copy link

@aead PTAL

@bh4t bh4t added the new-feature This PR implements a new feature label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature This PR implements a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants