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: impl to create new enollments using APKAM-OTP #453

Merged
merged 54 commits into from
Dec 19, 2024
Merged

Conversation

srieteja
Copy link
Contributor

@srieteja srieteja commented Nov 28, 2024

Closes #451

- What I did

AtAuth changes

  • Implement auth_cli that can send enroll requests using OTP and cut an atKeys file once that enrollment is approved.
  • fix at_activate bug: at_activate crashes when the atsign does not start with '@'
  • Introduce a new flag 'v' that makes activate_cli and auth_cli more verbose
  • Introduce new params 'd', 'p', 'n' in arg_parser that parses device_name, app_name and namespaces from command-line

AtClient changes

  • Add a new param to atclient_pkam_authenticate() named 'err_msg' that is populated with the error message from the server in case of an error
  • Introduce new option in get_public_key_request_options named 'should_auth' that allows the user to specify if the key provided to 'atclient_get_public_key()' should be fetched with/without auth. Supporting getter, setter, init and free methods have also been implemented.

AtCommons changes

  • Introduce new method in atcommons/enroll_namespace.c that parses namespace list strings and returns a 'enroll_namespace_t' struct
  • fix bug: The length var in enroll_namespace_list_t struct defaults to SIZE_MAX. (Fixed, defaults to 0 now)

- How I did it

  • fix bug: The length var in enroll_namespace_list_t struct defaults to SIZE_MAX: In 'atcommons_enroll_namespace_list_append' before appending the namespace to list, check if the length is equal to SIZE_MAX. Set to 0 if true.
  • Introduce new option in get_public_key_request_options named 'should_auth': If should auth is set to true, the client performs a 'plookup' for the given key. Otherwise performs a 'lookup'.

- How to verify it

  • test for 'atcommons_enroll_namespace_list_from_string' on the way

- Description for the changelog

  • feat: impl to create new enollments using APKAM-OTP

srieteja and others added 30 commits November 13, 2024 17:57
…t_commons

# Conflicts:
#	packages/atcommons/CMakeLists.txt
…t_commons

# Conflicts:
#	packages/atauth/src/atactivate.c
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.27.1 to 3.27.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@4f3212b...396bb3e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.27.3 to 3.27.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@396bb3e...ea9e4e3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.27.4 to 3.27.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@ea9e4e3...f09c1c0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
@srieteja srieteja merged commit 0fcec5f into trunk Dec 19, 2024
8 checks passed
@srieteja srieteja deleted the enroll_using_otp branch December 19, 2024 18:26
JeremyTubongbanua pushed a commit that referenced this pull request Dec 20, 2024
* feat: introduce new params into the arg_parser

* feat: add param "err_msg" to atclient_pkam_authenticate

* feat: new method to parse enroll_namespace_list_t from string

* feat: introduce auth_cli

* chore: revert changes reg recursive write in atclient/connection.c

* feat: migrate constants to atauth_constants.h + minor refactoring

* feat: support for unauthenticated public key lookup

* feat: support to parse enroll namespaces from string

* feat: add new request param 'should_auth' in get_public_key_request_options

* feat: completed auth_cli implementation

* feat: impl multiple exits for auth_cli + minor refactoring

* fix: linux specific header issue + unit test

* chore: fix examples

* fix: introduce init method and use for enroll namespace list

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: xavierchanth <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JeremyTubongbanua pushed a commit that referenced this pull request Dec 20, 2024
* feat: introduce new params into the arg_parser

* feat: add param "err_msg" to atclient_pkam_authenticate

* feat: new method to parse enroll_namespace_list_t from string

* feat: introduce auth_cli

* chore: revert changes reg recursive write in atclient/connection.c

* feat: migrate constants to atauth_constants.h + minor refactoring

* feat: support for unauthenticated public key lookup

* feat: support to parse enroll namespaces from string

* feat: add new request param 'should_auth' in get_public_key_request_options

* feat: completed auth_cli implementation

* feat: impl multiple exits for auth_cli + minor refactoring

* fix: linux specific header issue + unit test

* chore: fix examples

* fix: introduce init method and use for enroll namespace list

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: xavierchanth <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JeremyTubongbanua pushed a commit that referenced this pull request Dec 20, 2024
* feat: introduce new params into the arg_parser

* feat: add param "err_msg" to atclient_pkam_authenticate

* feat: new method to parse enroll_namespace_list_t from string

* feat: introduce auth_cli

* chore: revert changes reg recursive write in atclient/connection.c

* feat: migrate constants to atauth_constants.h + minor refactoring

* feat: support for unauthenticated public key lookup

* feat: support to parse enroll namespaces from string

* feat: add new request param 'should_auth' in get_public_key_request_options

* feat: completed auth_cli implementation

* feat: impl multiple exits for auth_cli + minor refactoring

* fix: linux specific header issue + unit test

* chore: fix examples

* fix: introduce init method and use for enroll namespace list

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: xavierchanth <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JeremyTubongbanua pushed a commit that referenced this pull request Dec 23, 2024
* feat: introduce new params into the arg_parser

* feat: add param "err_msg" to atclient_pkam_authenticate

* feat: new method to parse enroll_namespace_list_t from string

* feat: introduce auth_cli

* chore: revert changes reg recursive write in atclient/connection.c

* feat: migrate constants to atauth_constants.h + minor refactoring

* feat: support for unauthenticated public key lookup

* feat: support to parse enroll namespaces from string

* feat: add new request param 'should_auth' in get_public_key_request_options

* feat: completed auth_cli implementation

* feat: impl multiple exits for auth_cli + minor refactoring

* fix: linux specific header issue + unit test

* chore: fix examples

* fix: introduce init method and use for enroll namespace list

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: xavierchanth <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JeremyTubongbanua pushed a commit that referenced this pull request Dec 23, 2024
* feat: introduce new params into the arg_parser

* feat: add param "err_msg" to atclient_pkam_authenticate

* feat: new method to parse enroll_namespace_list_t from string

* feat: introduce auth_cli

* chore: revert changes reg recursive write in atclient/connection.c

* feat: migrate constants to atauth_constants.h + minor refactoring

* feat: support for unauthenticated public key lookup

* feat: support to parse enroll namespaces from string

* feat: add new request param 'should_auth' in get_public_key_request_options

* feat: completed auth_cli implementation

* feat: impl multiple exits for auth_cli + minor refactoring

* fix: linux specific header issue + unit test

* chore: fix examples

* fix: introduce init method and use for enroll namespace list

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: xavierchanth <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JeremyTubongbanua pushed a commit that referenced this pull request Dec 25, 2024
* feat: introduce new params into the arg_parser

* feat: add param "err_msg" to atclient_pkam_authenticate

* feat: new method to parse enroll_namespace_list_t from string

* feat: introduce auth_cli

* chore: revert changes reg recursive write in atclient/connection.c

* feat: migrate constants to atauth_constants.h + minor refactoring

* feat: support for unauthenticated public key lookup

* feat: support to parse enroll namespaces from string

* feat: add new request param 'should_auth' in get_public_key_request_options

* feat: completed auth_cli implementation

* feat: impl multiple exits for auth_cli + minor refactoring

* fix: linux specific header issue + unit test

* chore: fix examples

* fix: introduce init method and use for enroll namespace list

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: xavierchanth <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JeremyTubongbanua pushed a commit that referenced this pull request Dec 25, 2024
* feat: introduce new params into the arg_parser

* feat: add param "err_msg" to atclient_pkam_authenticate

* feat: new method to parse enroll_namespace_list_t from string

* feat: introduce auth_cli

* chore: revert changes reg recursive write in atclient/connection.c

* feat: migrate constants to atauth_constants.h + minor refactoring

* feat: support for unauthenticated public key lookup

* feat: support to parse enroll namespaces from string

* feat: add new request param 'should_auth' in get_public_key_request_options

* feat: completed auth_cli implementation

* feat: impl multiple exits for auth_cli + minor refactoring

* fix: linux specific header issue + unit test

* chore: fix examples

* fix: introduce init method and use for enroll namespace list

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: xavierchanth <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

at_activate: add functionality to create new enrollment using OTP
2 participants