Commit Graph

2417 Commits (abhinav/remove-gh-lint)

Author SHA1 Message Date
Enver Bisevac 00647d7d1b [MAINT] golangci-lint config changed (#31)
* goheader linter added

* file header consistency
2022-10-13 14:39:15 +02:00
Johannes Batzill ecb6276fa8 Add EOF to RPC File Chunk & Cleanups (#29)
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
2022-10-12 10:21:53 -07:00
Tan Nhu 6cadb048ba Initial skeleton for Repository Resource View flow (#30)
* API integration for Repos listing page

* Add custom branch when creating a repo

* Skeleton for Repository Resource View flow
2022-10-11 23:54:10 -07:00
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 5786ad2409 [Embedded] Harness Router, Inline Space Creation, Bootstrap, Harness/Admin User Setup (#28)
Adds the basic for harness embedded mode:
- Harness dedicated router with custom APIHandler
- Inline Space Creation
- Client for Account/Org/Project
- Bootstrap (Allows for automated creation of admin user and gitness service (used for all platform required ops))
- Inline harness service principal creation
- Ignore flag for ACL.
2022-10-10 21:32:14 -07:00
Johannes Batzill c07dc4c779 Remove translator (#26)
Simplify the router code by removing the translator. Now that we have Api/Git/WebHandler interfaces, they can be wrapped in handlers to do any custom request translation.
2022-10-04 10:16:26 -07: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
Tan Nhu e4cf2e7279 Update README.md 2022-10-03 12:17:43 -07:00
Tan Nhu 788ee30ba3 Add prototyping for Repos page (#24) 2022-10-03 12:06:27 -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 4668e94027 [Harness] Adding JWT/PAT/SAT Support, Harness Clients, Inline User/ServiceAccount Creation, harness Build flag, ... (#22)
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
2022-09-30 16:22:12 -07:00
Johannes Batzill 5baf42d5ca Add context to pingDatabase and change logging behavior (#21)
Add cancelable context to our server CLI and adds canceling and improved logging to PingDatabase
2022-09-27 09:45:52 -07:00
Johannes Batzill d0cba5509e Fix pingDatabase routine to complete on successful ping (#20) 2022-09-26 10:58:04 -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 f3ef0f64fc gh token secret for ci pipeline 2022-09-22 19:44:43 +02:00
Enver Bisevac 78d5794221 makefile build rule modified, ioutil deprecated removed 2022-09-22 16:27:46 +02:00
Enver Bisevac 66f2dadb7a [MAINT] fixing linter errors (#19)
* fix linter errors

* fix exhaust linter error

* fix exhaust linter error

* fix linter errors

* golangci-lint timeout increased

* golangci-lint verbose flag
2022-09-22 16:08:41 +02:00
Enver Bisevac 560c08dcca [MAINT] fix linter errors. (#18)
* fix linter errors

* fix exhaust linter error

* fix exhaust linter error
2022-09-21 19:49:14 +02: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
Enver Bisevac 11f3aa532c readme updated 2022-09-13 01:56:42 +02:00
Enver Bisevac 1808545de2 codeql workflow added 2022-09-13 01:48:14 +02:00
Enver Bisevac 47bbd0cdf7 codeql workflow added 2022-09-13 01:45:43 +02:00
Enver Bisevac cad145b4ae node action added in ci 2022-09-13 01:13:01 +02:00
Enver Bisevac 46b4b98d1f node action added in ci 2022-09-13 01:09:33 +02:00
Enver Bisevac 8aa924416d node action added in ci 2022-09-13 01:04:14 +02:00
Enver Bisevac 89b44d2862 node action added in ci 2022-09-13 01:03:19 +02:00
Enver Bisevac b416d5ce85 node action added in ci 2022-09-13 01:00:38 +02:00
Enver Bisevac e2d3baf58a Merge branch 'main' of github.com:harness/gitness 2022-09-13 00:39:45 +02:00
Enver Bisevac f87602e20e action status badge 2022-09-13 00:39:22 +02:00
Enver Bisevac 3d626f7099 Create ci.yml 2022-09-13 00:35:25 +02:00
Enver Bisevac a549689c16 Merge branch 'main' of github.com:harness/gitness 2022-09-13 00:28:28 +02:00
Enver Bisevac 90693f7a10 precommit modified 2022-09-13 00:28:14 +02:00
Enver Bisevac ca8aa47e05 [MAINT] initial work on linter setup (#16)
* initial work on linter setup

* simple linter rules fixed
2022-09-13 00:08:43 +02:00
Enver Bisevac f58ceac474 [MAINT] initial work on local dev env (#13)
* initial work on local dev env

* minor changes on makefile

* pre-commit x permission added

* readme updated and minor improvments in docker conf
2022-09-12 19:09:04 +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 608ae2f0c8 Add Basics for Authn, Authz, Spaces, Repos. #9
This PR removes some unnecessary files inherited from the sample-repo,
and adds the frame for the following:

Rest Server (terminated FQN encoding, high level routing, basic API/GIT/UI routes, repo/space/user injection into request)
Spaces (Struct, DB, CRUD Operations)
Repos (Struct, DB, CRUD Operatons)
guard middleware for simplifying authorization
Authentication (Abstraction, frame for harness integration)
Authorization (Abstraction, harness ACL based implementation)
2022-09-06 15:02:41 -07:00
Johannes Batzill 3fa479429c Address comments on customer guard errors 2022-09-06 15:01:13 -07:00
Johannes Batzill 4545ffa666 add one more assumption to harness ACL client 2022-09-05 22:29:40 -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
Johannes Batzill 32e6c4929f Add authn, authz, spaces, guard, terminated FQNs 2022-09-05 13:47:00 -07:00
Johannes Batzill 84393e0e12 Add frame for authn and initial harness authz implementation 2022-09-05 13:47:00 -07:00
Johannes Batzill 4cd1ecebf1 Remove unnecessary types 2022-09-05 13:47:00 -07:00
Tan Nhu 95312aef30 Merge pull request #8 from harness/rename-scm-to-gitness
Rename SCM to Gitness
2022-08-29 14:29:23 -07:00
Tan Nhu 2ccfb74a51 Rename SCM to Gitness 2022-08-29 14:28:46 -07:00
Johannes Batzill c9792ad58d Rename project to 'gitness'
Rename project to `gitness` based on Jyoti's suggestion.
2022-08-29 10:17:47 -07:00