elastic / elastic/fleet-server
[JWT] Support authentication based on JWT
- Dominant language
- Go
- Stars
- 113
- Forks
- 117
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 112
Description
Fleet Server should accept requests by agents authenticated using JWT tokens, as the ones emitted by https://github.com/elastic/fleet-server/issues/3289.
It should validate the JWT token with the following steps:
- The signature of the token, using the public key.
- The expiration time, if present.
- The `iss` claim must match with the current project.
- The `sub` claim must match with an agent ID in the `.fleet-agents` index, to validate that the agent is actually enrolled and not removed from the system. This helps in case of revocation.
- The `jti` claim must match with one of the current JWT IDs in the `.fleet-agents` index.
Refresh tokens should not be accepted on any operation, apart on requesting new tokens as defined in https://github.com/elastic/fleet-server/issues/3289.
There must be settings for:
- [ ] Controlling the authentication methods supported (API keys, JWT). Default to both.
- [ ] Disabling validations on the `.fleet-agents` index, to make validation completely reliant on stateless JWT. Default to use `.fleet-agents` for validation.
Contributor guide
Assessment
This issue has not been assessed yet.