This PR adds a githook sub-package to our cmd packages, introducing the githook binary.
The binary is linked as pre-receie/update/post-receive by gitrpc if configured.
This is required to have a gitrpc deployment without requiring the one-in-all gitness binary on the same machine.
This change is a follow up on the effort to remove transactions and sync stores from the database layer, and move them in the application layer. It is addressing the repo + space store.
The following changes are included:
- Introduce PathStore storing resource paths (repo + space)
- Add foreign key from path.repo_id/space_id to repo.id/space.id
- Add foreign key from repo/space.parent_id to space.id
- Remove repo_sync and space_sync
- Move path creation logic to repo/space controller (for both creating primary paths for new repos/spaces, as well as creating alias spaces)
- Reimplement repo/space moving on controller layer
This change adds the following:
- Space UID + Custom harness validation (accountId for top level space, harness identifier for child spaces)
- Repo UID + Custom harness validation (harness identifier)
- Store Unique casing of space / repo path and add Path.ValueUnique (with Unique index) to allow for application layer controlling the case sensitivity (case insensitive standalone vs partially case sensitive harness)
- Token UID (unique index over ownertype + ownerID + tokenUID)
- Add DisplayName for principals (replaces Name to avoid confustion)
- Store Unique casing of principal UID and add Principal.ValueUnique (with unique index) to allow for application layer, per principal type control of case sensitivity (required in embedded mode)
- Generate serviceAccount UID (+Email) Randomly (sa-{space|repo}-{ID}-{random}) - Allows to have a unique UID across all principals while reducing likelyhood of overlaps with users + avoid overlap across spaces / repos.
- Sync casing of space names (accountId orgId projectId) when creating spaces on the fly (to ensure case sensitivity of - harness code) or use the existing space to update casing.
- Update serviceaccount client to match updated NG Manager API
- in embedded mode create spaces for harness resources owning the service account
Adds an EOF flag to data chunks to avoid using []byte("EOF") as end (due to potential false positives).
Furthermore, a few cleanups are done:
- Add TODOs for initial git changes
- Add missing file headers
- Fix typo for license (was licence)
- Fix make wire target
* initial work on create repository
* create repository as single method call using client stream
* resources handler and files
* minor fix for wire dep graph
This change adds the initial stepping stones for harness integration:
- Authentication: JWT/PAT/SAT support
- Authorization: ACL integration (acl currently denies requests as gitness hasn't been integrated yet)
- Remote Clients for Token, User, ServiceAccount, ACL
- User Integration: Syncs harness users during authentication if unknown
- SA integration: syncs harness service accounts during authentication if unknown
- Initial harness API: THIS WILL BE CHANGED IN THE FUTURE!
- single harness subpackage (all marked with harness build flag)
- harness & standalone wire + make build commands