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

pgp key retrieval requires auth #4255

Closed
michel-laterman opened this issue Dec 30, 2024 · 0 comments · Fixed by #4256
Closed

pgp key retrieval requires auth #4255

michel-laterman opened this issue Dec 30, 2024 · 0 comments · Fixed by #4256
Assignees
Labels
bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@michel-laterman
Copy link
Contributor

The PGP retrieval endpoint requires auth from the client:

key, err := authAPIKey(r, pt.bulker, pt.cache)
if err != nil {
return err
}
zlog = zlog.With().Str(LogEnrollAPIKeyID, key.ID).Logger()

While this is defined behaviour as part of the OpenAPI spec

fleet-server/model/openapi.yml

Lines 1762 to 1768 in 76abe76

/api/agents/upgrades/{major}.{minor}.{patch}/pgp-public-key:
get:
operationId: getPGPKey
summary: retrieve a PGP key from the fleet-server's local storage.
description: "Get a PGP key that can be used to verify agent upgrades. Key is stored on (fleet-server's) disk."
security:
- apiKey: []

it should be removed as agents do not include an API key when attempting to get the PGP key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant