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

#WIP: App token service Create #4624

Draft
wants to merge 25 commits into
base: llb-app-tokens
Choose a base branch
from
Draft

Conversation

uruemu
Copy link
Collaborator

@uruemu uruemu commented Apr 10, 2024

No description provided.

jimlambrt and others added 23 commits February 23, 2024 09:20
* Create table for app_token

* Update app_token schema — Fix broken queries

* Added triggers for app_token

* Formatting and add app_token_expiration_interval

* app_token_periodic_expiration_immutable triggers

* app_token_grant table and triggers

* app_token_usage table and triggers

* Fix app_token_periodic_expiration_interval trigger

* Add tests for app_token schema

* Add missing comment

* Update comments

* Fix formatting

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>

---------

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
* feat (apptoken): added proto storage for apptoken

This includes addition to Makefile for injecting tags
* feat (apptoken): add AppTokenGrant type

* test (apptoken): add unit tests for app token grant type

* refactor (apptoken): update return for NewAppTokenGrant

* refactor (apptoken): update error message for grant parsing error

* test (apptoken): update error message for NewAppTokenGrant unit tests

* refactor (apptoken): add fakeScopeId const to be clear it is fake
* Add type for AppTokenUsage

* License

* Address PR comments

* Update internal/apptoken/app_token_usage.go

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>

* Update internal/apptoken/app_token_usage.go

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>

* Fix comment

---------

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
* Create user

* #WIP

* create #WIP

* fixup! create #WIP

* Create

* fix (apptoken): fix typo in oplog insert

* fix (apptoken): specify iam Option for grantFinder func

* feat (apptoken): add Repository.ResolveUserHistory

* test (apptoken): add Test_CreateAppToken

* fix (apptoken): add oplog metadata to CreateAppToken

* fixup! test (apptoken): add Test_CreateAppToken

* test (apptoken): create NewAppToken fixture (#4070)

* test (apptoken): create NewAppToken fixture

* test (apptoken): update TestNewRepository to include grantfinder

* test (apptoken): add db lookups for apptokens and apptoken grants

* fixup! fix (apptoken): add oplog metadata to CreateAppToken

* Add createapptoken validation error tests

* Add test for invalid grant

* Remove todo

* repository tests

* Use kms.GetWrapperer and add tests

* tests (apptoken): add invalid opt test for CreateAppToken(...)

---------

Co-authored-by: Jim <jlambert@hashicorp.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
…required API definitions/docs (#4229)

* feat (apptoken): add protos for apptokens service

These proto defs include gotags for classification of data (e.g. public,
sensitive, secret) and for the purpose of event observations.

It also includes adding the newly generated protobufs to the Makefile
which enables to the added gotags to be acted upon by protoc-go-inject

* feat (apptokens): add apptokens to input.go so it can gen api bits
* feat (apptoken): add read repository method

* refact (apptoken): create returns apptoken with grant value objects
* feat (apptoken): added proto storage for apptoken (#3913)

* feat (apptoken): repository delete

* test (apptoken): repository delete

* refactor: rebase llb-app-token

* refactor (apptoken): update if statements to switch

---------

Co-authored-by: Jim <jlambert@hashicorp.com>
@uruemu uruemu changed the base branch from main to llb-app-tokens April 10, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants