Commit Graph

12 Commits (1cf07b64171be710969e42c05560faad944bf023)

Author SHA1 Message Date
Enver Bisevac 1cf07b6417 initial work on create repository (#27)
* initial work on create repository

* create repository as single method call using client stream

* resources handler and files

* minor fix for wire dep graph
2022-10-11 17:48:04 +02:00
Johannes Batzill fad6e18898 Introduce Controller for Repo, Space, User, and ServiceAccount (#25)
Preparing the support for harness specific API router + http handler, which allows us to have complete control over the rest api naming and functionality, without having to do complex path rewrites or request / reponse rewrites inline.
2022-10-03 18:56:49 -07:00
Johannes Batzill 4d3db64397 add specific handlers for api/git/web to allow replacement for harness (#23)
Abstracting the api/git/web routers will allow us to replace API routing (and potentially web?), while keeping the rest the same.
2022-09-30 17:05:39 -07:00
Johannes Batzill 8c2f900c80 Principals, ServiceAccounts, Tokens and auth.Sessions (#15)
This change introduces the concept of a principal (abstraction of call identity), and adds a new service account type principal. Also adds support for different tokens (session, PAT, SAT, OAuth2) and adds auth.Session which is being used to capture information about the caller and call method.
2022-09-25 23:44:51 -07:00
Enver Bisevac f03528e862 [MAINT] initial config for ci linter (#17)
* initial config for ci linter

* more linter work

* linter errors fix

* linter errors fix

* linter conf minor changes
2022-09-19 18:13:18 +02:00
Johannes Batzill b7b9f53b0d Improve error handling to match go standards - don't wrap and rethrow, but log and return. Also adds some more validations for path creation and resource moving. Add accesslogging for git and api router (#14)
This commit contains the following:
- Improve and simplify error handling (remove unnecessary wrappers, make it feel like go)
- Add extra validation for path creation and resource moving (path has to be within same top space, no top space alias allowed)
- Add access logging for rest api and git api
2022-09-09 22:08:46 -07:00
Johannes Batzill 4812beedc6 Enforce max path length on store layer to avoid racing condition, (#12)
Add enforcement of the path length to the store layer before writing the path, move errs to internal, and adds a comms package under internal/api.
2022-09-09 00:45:41 -07:00
Johannes Batzill 1115a5083b Add `Paths` support and error improvements (#11)
This change is adding the concept of Paths.
A repository and space always have a Primary Path which always is represents the ancestry to the root space.
All access history / resource visibility / child listings / UI traversal / etc. is done via that path.

Additionally, repos and spaces can have Alias Paths, which as the name states are aliases. via the primary path.
They sole impact is that a space or repo can be reached via different paths from the UI / rest apis / git apis.
This fulfills two major purposes:
- Customers can rename or move projects and spaces without breaking any existing references from CI pipeliens / code bases / local repos / ...
- Customer can create shorter aliases for important repos when in harness embeded mode! (acc/org/proj/repo can be shortened to acc/repo, or acc/repo'

Apart from the path changes, this PR adds:

Improved User facing errors
Improved internal error handling and wrapping
update / rename operation for repo and space
path list / delete / create operation for repo and space
2022-09-08 21:39:15 -07:00
Johannes Batzill 1db4fc9c8d Change create API for space/repo to follow REST best practices (#10)
Move repo and space create apis to /api/v1/repos/ and /api/v1/spaces/ and take name and parentId in body.
2022-09-06 20:36:34 -07:00
Johannes Batzill 3b6f6b8916 Add proper scoping to authorization code 2022-09-05 22:17:16 -07:00
Johannes Batzill ff806fb492 block 'api' as root space name, minor improvements 2022-09-05 18:45:16 -07:00
Johannes Batzill d7f0ae4b2c Add base structure for rest api, git api, web api. Add base authn and authz, as well as spaces and repository apis 2022-09-05 13:47:00 -07:00