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

ACP - Full Identity Authentication #2017

Closed
shahzadlone opened this issue Nov 5, 2023 · 0 comments · Fixed by #2649
Closed

ACP - Full Identity Authentication #2017

shahzadlone opened this issue Nov 5, 2023 · 0 comments · Fixed by #2649
Assignees
Labels
area/acp Related to the acp (access control) system feature New feature or request

Comments

@shahzadlone
Copy link
Member

shahzadlone commented Nov 5, 2023

ACP - Full Identity Authentication

Initially we only have simple identity

@shahzadlone shahzadlone added the feature New feature or request label Nov 5, 2023
@shahzadlone shahzadlone changed the title ACP - Signature to Authenticate Identity ACP - Full Identity Authentication Feb 29, 2024
@shahzadlone shahzadlone added the area/acp Related to the acp (access control) system label Feb 29, 2024
nasdf added a commit that referenced this issue May 31, 2024
## Relevant issue(s)

Resolves #2017

## Description

This PR adds ACP identity authentication via HTTP.

Notable changes:
- `acp/identity` has been replaced with the `acp.Identity` struct
  - `identity.PrivateKey` is the private key of the identity
  - `identity.PublicKey` is the public key of the identity
  - `identity.Address` is the bech32 formatted address for the identity
  - keys are all `secp256k1`
- `http` can authenticate requests using a jwt bearer token
- ~a random `audience` value is generated on every http server startup~
  - audience must be set to the defradb host name
  - ~api route `/audience` returns the random audience value~
- `http.Client` will create a signed token if an
`acp.PrivateKeyIdentity` is set
  - jwt token subject is the identity public key
- `cli` `--identity` flag is now a hex encoded private key

Todo:
  - [x] ensure acp docs are updated

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

`make test`

Specify the platform(s) on which this was tested:
- MacOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/acp Related to the acp (access control) system feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants