Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
410d94e
feat: migrate to gotocompany (#1)
rahmatrhd Mar 14, 2023
536bd55
feat: convert duration to days for slack approval notification (#2)
bsushmith Mar 15, 2023
31b0908
feat: add pagination support in ListUserApprovals api (#6)
bsushmith Mar 17, 2023
efc92d3
feat(appeal): send appeal rejection notification for auto rejected st…
bsushmith Mar 24, 2023
d7e9b83
feat(bigquery): fetch labels for dataset and table resources (#9)
rahmatrhd Mar 27, 2023
a5e0740
feat(provider): fetch resources on provider update (#16)
bsushmith Apr 6, 2023
93e2973
fix: rename default notification template file (#21)
bsushmith Apr 18, 2023
3c948f9
feat: add formatted expiration_date variable to expiration reminder m…
bsushmith May 2, 2023
b2aea85
chore: add labels to slack notifier logs (#26)
bsushmith May 2, 2023
3c37a41
feat(approval): add appeal_statuses filter for list approvals API (#25)
bsushmith May 2, 2023
2f1b5bf
fix: use mutex locks while fetching resources in errgroup (#28)
bsushmith May 8, 2023
2d90d1b
feat(policy): introduce expression in additional appeal requirement t…
rahmatrhd May 9, 2023
8dd8a7c
fix(policy): return error when approvers evaluation returns nil (#32)
rahmatrhd May 15, 2023
a68562f
fix: check for errors while casting metabase group permission (#36)
bsushmith May 17, 2023
e115c98
fix: send proper error code in case of bad request (#38)
bsushmith May 19, 2023
6b9ff2a
feat: allow appeal creation to continue on creator details fetch erro…
rahmatrhd May 22, 2023
801c923
chore: bump up expr version to v1.12.5
bsushmith Jun 1, 2023
e99ff1e
Revert "chore: bump up expr version to v1.12.5"
bsushmith Jun 1, 2023
3d19f4f
feat: inactive accounts revocation (#27)
rahmatrhd Jun 6, 2023
30d1f9f
feat: support google idtoken authentication in iam http client (#43)
rahmatrhd Jun 6, 2023
3a71e10
feat(appeal): add variables to approver notification message (#46)
bsushmith Jun 8, 2023
35c97d2
chore: bump up expr version to v1.12.5 (#44)
bsushmith Jun 8, 2023
5b691c7
feat(appeal): use accountID filter to fetch pendingAppeals (#53)
bsushmith Jun 13, 2023
7966278
feat(approval): support search query and filter by resource type and …
rahmatrhd Jul 3, 2023
46a0e05
fix: fix goreleaser action (#59)
rahmatrhd Aug 15, 2023
9f36481
feat: grant dormancy check (#56)
rahmatrhd Aug 16, 2023
ad1350e
feat: accept base64 encoded credentials in policy.IAM config (#61)
rahmatrhd Aug 23, 2023
9fb85ea
feat: add pagination for list appeal and list grant (#60)
lifosmin Aug 29, 2023
d477a14
feat: Search and Filter for ListAppeals and ListGrants (#62)
lifosmin Aug 31, 2023
7023ec4
feat(gcloud_iam): manage service account access (#58)
rahmatrhd Aug 31, 2023
b6afb30
feat(notifiers): support multiple slack workspaces (#67)
bsushmith Sep 12, 2023
5bb71fc
fix: fix bug in list grants with resource filters (#65)
lifosmin Sep 12, 2023
b7406c9
feat: Added new ListRolesApi (#64)
lifosmin Sep 12, 2023
3bd8e74
fix: add nil check (#70)
bsushmith Sep 14, 2023
2a882f3
feat(resource): support batch in BulkUpsert (#71)
rahmatrhd Sep 16, 2023
1d897e8
chore: fix q filter for list user grant (#72)
lifosmin Sep 16, 2023
80a35d6
fix: bug in appeal creation (#74)
bsushmith Sep 20, 2023
b2ee1e8
build: use updated validate plugin (#79)
bsushmith Sep 23, 2023
a6cbf68
feat: add pagination for list resources (#77)
anjali9791 Sep 26, 2023
930d740
fix(policy): skip validate approver in case expression has appeal.res…
utsav14nov Sep 26, 2023
31928c0
fix(bigquery): fetch only required tables (#82)
bsushmith Sep 27, 2023
015cb06
feat(store): ability to configure db conn settings (#89)
bsushmith Oct 3, 2023
d69c5c9
feat(server): ability to configure grpc server settings (#88)
bsushmith Oct 4, 2023
993e2c5
feat(dataplex): save taxonomy display name for policy tag (#90)
bsushmith Oct 5, 2023
38643f8
feat(grant): add unique index for active grants (#91)
rahmatrhd Oct 11, 2023
8756bf7
fix(gcloudiam): add check for duplicate roles (#94)
bsushmith Oct 12, 2023
502d2bf
fix: add `resource_id` to grant unique index (#96)
rahmatrhd Oct 16, 2023
f214eac
feat(bigquery): allow custom roles for bigquery dataset resource type…
rahmatrhd Oct 16, 2023
c7e407c
fix(bigquery): remove role validation on grant & revoke dataset (#98)
rahmatrhd Oct 23, 2023
fce526c
fix(policy): skip validate approver for arbitrary appeal values (#100)
bsushmith Oct 25, 2023
5931e0a
chore: bump expr library version to 1.15.3 (#103)
bsushmith Oct 25, 2023
2c3fdbc
chore: replace deprecated func call in tests (#105)
bsushmith Nov 2, 2023
4061058
fix(provider): bigquery provider with only resource type table insert…
abhishekv24 Nov 8, 2023
cfa2bb2
feat!: remove scheduled jobs from server (#107)
bsushmith Nov 8, 2023
7c4c54b
feat!: add trace-id to logs in guardian (#102)
bsushmith Nov 8, 2023
22fe7f1
chore: remove notes comment
rahmatrhd Nov 9, 2023
7c22189
perf(bigquery): fetch tables concurrently from bq (#112)
bsushmith Nov 17, 2023
fa845fb
feat(resource): allow get, update, and delete resource by `global_urn…
lifosmin Nov 27, 2023
16b3000
fix: fix error to status code mapping (#110)
rahmatrhd Dec 6, 2023
bf6a692
feat: add revoke reason to revoke notification variables (#115)
bsushmith Dec 7, 2023
5366eaf
feat: add filter on resource.name in list grants using query field (#…
bsushmith Dec 14, 2023
4c06e74
chore: add error log in fetch resource in provider service (#117)
utsav14nov Jan 17, 2024
54ede0c
chore: add log for debugging (#119)
abhishekv24 Feb 1, 2024
57cd794
fix: return error in case taxonomies fails with any error (#121)
utsav14nov Feb 7, 2024
4cdfc56
fix(appeal): handle duplicate active grants (#120)
abhishekv24 Feb 15, 2024
607e725
fix: same total count when offset and size is applied (#122)
utsav14nov Feb 15, 2024
0f87a6f
fix: add order_by in list resource request and also default order by …
utsav14nov Feb 16, 2024
a47bd0c
chore: use mockery v2.33.0 (#126)
rahmatrhd Feb 28, 2024
d2cdd5a
feat(resource): introduce search query in list resources API (#129)
rahmatrhd Mar 4, 2024
6ea2731
feat: introduce gitlab provider (#128)
rahmatrhd Mar 4, 2024
407b192
fix: fix missing total count when offset > 0 in list resources and li…
rahmatrhd Mar 15, 2024
1aa0327
feat(policy): allow provider config to specify to latest policy versi…
idilhaq Mar 18, 2024
9643b56
feat(appeal): fetch resources, providers, policies and appeals with e…
idilhaq Mar 18, 2024
a2376bb
fix(approvers): duplicated approver is not allowed (#135)
idilhaq Mar 25, 2024
526673b
feat(policy)!: remove exposed sensitive data (#138)
idilhaq Mar 25, 2024
f33ab8a
fix(policies): fix empty IAM config case (#142)
idilhaq Mar 25, 2024
2020b15
feat(resource): support resource search by global urn (#141)
rahmatrhd Mar 25, 2024
1576fad
fix: fix approvals pagination not returning paginated records (#143)
rahmatrhd Mar 26, 2024
231c8f0
feat(go): upgrade go version to 1.21 (#145)
idilhaq Apr 23, 2024
3a9dc95
test(appeal): refactor appeal service test to use individual service …
rahmatrhd Apr 24, 2024
1998a3c
feat(appeal): introduce appeal metadata (#139)
ayushi0014 Apr 29, 2024
a050ec0
fix(appeal): ensure access to be granted in provider on grant extensi…
idilhaq May 2, 2024
6bef30c
chore(sever): add http_path field in request log (#148)
rahmatrhd May 2, 2024
5aeae47
feat(comment): introduce appeal comments (#127)
rahmatrhd May 8, 2024
6e243b2
fix(store): allow dynamic ORDER BY options, improve resource search, …
abhishekv24 May 28, 2024
e212d92
fix(store): make search query case insensitive in order by clause (#155)
abhishekv24 May 28, 2024
e54f816
feat(appeal): introduce appeal activities (#151)
rahmatrhd May 30, 2024
457de70
feat(notifier): sending notification concurrently (#136)
idilhaq Jun 3, 2024
133300f
feat(log): sending audit log concurrently (#140)
idilhaq Jun 4, 2024
c90f972
feat(appeal): added patch appeal API (#150)
ayushi0014 Jun 4, 2024
8b1dde5
feat(grant): add restore grant API (#125)
rahmatrhd Jun 4, 2024
fc6b2db
fix: fix grpc call error (#154)
rahmatrhd Jun 4, 2024
b443fc2
fix(approval): restrict add/remove approver on stale approval (#156)
rahmatrhd Jun 4, 2024
be81a3b
fix(gitlab): fix gitlab access & revoke behaviour (#158)
rahmatrhd Jun 6, 2024
0970074
fix(audit): fix context cancelled on concurrent calls (#159)
rahmatrhd Jun 19, 2024
e391745
fix(edit-appeal): check details interface recursively to validate if …
ayushi0014 Jun 19, 2024
8c3e4f1
feat(job): pending approvals reminder job (#160)
idilhaq Jun 20, 2024
396f293
fix(gcloud_iam): fetch service account resources with pagination (#162)
rahmatrhd Jun 21, 2024
e89f850
feat(email): handling email case sensitive (#165)
idilhaq Aug 1, 2024
46d45ac
feat(gate): introduce gate provider (#164)
rahmatrhd Aug 1, 2024
f192300
feat(notifier): expose variables in notifier criteria (#166)
rahmatrhd Aug 6, 2024
6fbebbe
feat: add support for google_oauth2 token. Related to issue: https://…
anjali9791 Aug 13, 2024
521ab2d
feat: add support for expression in request body when fetching metada…
anjali9791 Aug 13, 2024
284b971
ci: lock golangci-lint to v1.59 (#172)
rahmatrhd Aug 20, 2024
2461f9e
chore: fetch creator details before fetching metadata sources as they…
anjali9791 Aug 21, 2024
be2d47c
test(appeal): add fix for failing test case (#176)
anjali9791 Aug 26, 2024
31420a7
feat(notifier): lark support for guardian (#163)
harishkswami Aug 27, 2024
b87bd5a
feat: update approval check for self approval (#178)
utsav14nov Aug 30, 2024
4a0c3b0
fix: notifier backward compatibility issue (#179)
utsav14nov Sep 4, 2024
50feb29
feat(grant): update grant expiration date (#171)
rahmatrhd Sep 4, 2024
a048f7f
feat: integrate otel collector in guardian (#173)
lifosmin Sep 19, 2024
74a1ba6
fix: backward compatibility for notifiers in job (#181)
utsav14nov Oct 8, 2024
8ac4398
fix: adding guard condition for empty notification list in notify fun…
utsav14nov Oct 8, 2024
8f8b145
feat: track external client logs (#183)
lifosmin Nov 1, 2024
62383b1
feat(revoke): add revoke param skip nofitication and revoke in provid…
idilhaq Nov 7, 2024
44b1d22
feat(resource): search query by resource name on appeals and approval…
idilhaq Nov 13, 2024
d71ef25
feat(job): only upsert updated resources into the db (#184)
lifosmin Nov 18, 2024
f3a9c6a
feat: updated shield provider to support new shield version (#180)
utsav14nov Nov 22, 2024
691ddd6
fix: bug in new shield client (#191)
utsav14nov Nov 22, 2024
6d09d2b
fix: fetch children (#189)
lifosmin Nov 28, 2024
1d73c05
feat(policy): apply dynamic policy (#188)
idilhaq Dec 11, 2024
bdd5fe4
feat: maxcompute provider (#192)
rahmatrhd Dec 16, 2024
df093f6
feat: oss Provider (#193)
ayushi0014 Dec 16, 2024
dd17ff7
fix: fixed sts client caching (#195)
ayushi0014 Dec 23, 2024
a044d98
feat(oss): enable bucket access for ram role (#194)
ayushi0014 Dec 24, 2024
4bacaac
feat(plugins): implement AliCloud RAM plugin (#190)
bearaujus Dec 26, 2024
d9dedb8
fix(plugins/maxcompute): handle schema-based table listing in resourc…
bearaujus Jan 13, 2025
1d4b087
fix(plugins/maxcompute): Add Role To Assume From Provider On Fetch Re…
bearaujus Jan 13, 2025
ae172de
fix(plugins/maxcompute): surround max compute query params with backt…
bearaujus Jan 13, 2025
36e0b7b
fix(plugins/maxcompute): adjust resource type table query (#199)
bearaujus Jan 14, 2025
0bfc8dc
feat: new primary key id column for audit log (#200)
lifosmin Feb 10, 2025
50f7b10
feat(plugin/notifiers): improve lark notification error visibility (#…
bearaujus Feb 28, 2025
ca1561c
fix(provider-maxcompute): fixed and refactored maxcompute and oss cli…
ayushi0014 Mar 10, 2025
4afefcd
fix(provider): fixed OSS provider (#204)
abhishekv24 Mar 18, 2025
a7ecb5f
feat(plugins/maxcompute): implement schema level access (#205)
bearaujus Mar 25, 2025
870e8ab
fix(plugins/maxcompute): increase maximum item to fetch per request w…
bearaujus Mar 26, 2025
90b225d
feat: add otel for guardian jobs (#206)
lifosmin Mar 27, 2025
062a12c
fix(plugins/maxcompute): quote resource identifiers in GRANT and REVO…
bearaujus Apr 17, 2025
faaa89c
feat (plugins/maxcompute): support schema level access member role as…
bearaujus Apr 25, 2025
d586bb1
feat (plugins/maxcompute): refactor alicloud providers and packages (…
bearaujus May 28, 2025
f6374a1
fix(plugins/maxcompute): alicloud error response unwarp panic (#212)
bearaujus Jun 2, 2025
0da597e
fix(plugins/maxcompute): children-parent mapping (#213)
bearaujus Jun 30, 2025
ca7e145
feat(provider): Google group provider (#215)
ayushi0014 Jul 1, 2025
a574156
feat(core/policy): introduce a new field in the policy requirements (…
Gadigeppa-J Jul 8, 2025
452f6f1
fix(appeal): correct error handling in populateAppealMetadata (#214)
abhishekv24 Aug 4, 2025
e69d9ad
feat(shield): introduce dynamic resources for shield provider (#217)
lifosmin Aug 19, 2025
8969a49
feat: implement approvals summaries (#218)
bearaujus Sep 15, 2025
741c86a
chore: update mockery (#223)
rahmatrhd Sep 15, 2025
6d09da1
feat: add group and provider filters to approval apis (#224)
bearaujus Sep 17, 2025
7420f05
feat: implement alicloud sso plugin (#219)
bearaujus Sep 17, 2025
c04570d
feat: add support for group_id and group_type for appeals (#220)
anjali9791 Sep 17, 2025
143a6da
feat: introduce create resource API (#222)
rahmatrhd Sep 18, 2025
0fe24f5
feat: add actor filters to approval apis (#226)
bearaujus Sep 18, 2025
3446272
feat: introduce `guardian` provider plugin (#221)
rahmatrhd Sep 23, 2025
d330968
fix(provider): fix provider parameter validation (#228)
rahmatrhd Sep 29, 2025
e359e07
feat: support search by resource ids for list appeals (#229)
bearaujus Sep 29, 2025
110f567
chore: change shield resource urn into using id (#232)
lifosmin Oct 28, 2025
873e312
feat: implement summary and advanced filtering for grant and approval…
bearaujus Oct 28, 2025
eb824a4
feat: refactor smart inactive grant filtering logic (#236)
bearaujus Oct 29, 2025
14723bb
feat: add multi-value filters to ListResources api (#237)
bearaujus Nov 4, 2025
b66ed23
feat: add summary support to ListAppeals apis & support bot user gran…
bearaujus Nov 6, 2025
1c3de97
chore: sync postgres migration files (#239)
bearaujus Nov 7, 2025
a7fa2ea
feat: add support for distinct count for grouped fields (#240)
anjali9791 Nov 17, 2025
a15fd7f
Fix: shield resource access grants id (#242)
lifosmin Nov 20, 2025
efdda4a
chore: remove resource update on appeal update and some fixes (#241)
anjali9791 Nov 20, 2025
3219c0c
fix: fix search on details nested fields whose value include colon (#…
anjali9791 Nov 27, 2025
aaff5bf
feat: add support for dry run mode for appeal creation (#244)
bearaujus Nov 28, 2025
bab089d
chore: allow all resource types which start with package (#245)
anjali9791 Dec 2, 2025
be738b1
feat: add terms and conditions for policy and with_approval for list …
bearaujus Dec 12, 2025
e0e62b3
feat: add support for custom policy steps (#225)
anjali9791 Dec 12, 2025
327b529
feat: grant documentation (#247)
lifosmin Dec 17, 2025
cd22830
feat: add custom advance approval for dry run (#248)
bearaujus Dec 18, 2025
5f6c949
fix: nil error returned during appeal creation (#249)
bearaujus Dec 18, 2025
988d409
fix: add allow failed statement on appeal creation (#250)
bearaujus Dec 18, 2025
05e114b
feat: enable evaluated appeal rejection reason & prevent multiple quo…
bearaujus Dec 19, 2025
df208f8
feat: support search by owners in list grants (#252)
bearaujus Jan 7, 2026
0e28340
feat: add advanced filtering to grant, approval, appeal list endpoint…
bearaujus Jan 14, 2026
4ec0158
feat: add advanced role and resource filters to list apis + add suppo…
bearaujus Jan 16, 2026
ea6cc03
Feat: Guardian Appeal Labeling Feature (#255)
Gadigeppa-J Jan 21, 2026
317e577
feat: implement custom http provider (#253)
lifosmin Jan 22, 2026
75ed66f
feat: add advanced filtering for appeal details & group type fields +…
bearaujus Jan 22, 2026
c142d18
feat: add more support for details scrapping, support NotAppealDetail…
bearaujus Jan 23, 2026
04e6596
fix: include null value when NotAppealDetailsForSelfCriteria present …
bearaujus Jan 23, 2026
052f9fe
feat: add more filters to policy, provider, appeal, and grant list re…
bearaujus Jan 27, 2026
1c86dd0
chore: add label filter support for list approvals api (#261)
Gadigeppa-J Jan 28, 2026
2fe9a87
feat: implement summary & filters for labels (#262)
bearaujus Jan 28, 2026
161ddc6
fix: dependent grant logic where the grant should be re-created (#264)
bearaujus Jan 30, 2026
50eec8e
feat exact expiration date in appeal (#265)
lifosmin Feb 5, 2026
77bb367
fix validation exact expiration date in appeal (#267)
lifosmin Feb 5, 2026
a549319
feat: add support for relabeling appeal labels (#268)
Gadigeppa-J Feb 5, 2026
efbec96
feat: ensure appeals is exist in the db before executing post-hooks +…
bearaujus Feb 6, 2026
f52efe2
chore: validation fix (#269)
lifosmin Feb 9, 2026
51a149e
fix: add isZero logic to check if expiration_date is empty (#270)
anjali9791 Feb 10, 2026
50dad4a
fix: prioritize duration over expiration date on grant (#271)
lifosmin Feb 10, 2026
3a7e6fe
feat: enable to populate appeal metadata using header (#272)
bearaujus Feb 13, 2026
0d7160d
feat: enable group account type in gitlab provider (#273)
lifosmin Feb 25, 2026
625ec7f
fix: preserve group_id and group_type on appeal patch to populate gra…
bearaujus Mar 3, 2026
dcd494c
chore:enable gitlab gorup resource creation (#278)
lifosmin Mar 9, 2026
592264a
chore: support add/update approval steps (#277)
anjali9791 Mar 10, 2026
0a98975
chore: ignore 409 error (#279)
anjali9791 Mar 13, 2026
71f72aa
chore: [maxcompute] add config to fetch owner detail (#282)
anjali9791 Mar 27, 2026
2932586
feat(grant): add exclude_empty_appeal filter to ListGrants and ListUs…
bearaujus Apr 9, 2026
8e4b276
feat: add support to prioritize search by exact match first (#285)
bearaujus Apr 9, 2026
037c56d
feat(grant): add inactive grant policy scoping for ListGrants (#287)
bearaujus Apr 10, 2026
4a1857e
feat(summary): add summary_labels_v2 faceted search support (#288)
bearaujus Apr 10, 2026
9e214b4
feat: optimus provider (#280)
Mryashbhardwaj Apr 14, 2026
9d50888
feat: implement bot specific package (#283)
bearaujus Apr 27, 2026
8c2ac76
fix: access revocation error for AliCloudSSO (#291)
bearaujus May 4, 2026
8bb43da
feat: add resource details filter to list appeal & grant (#290)
bearaujus May 6, 2026
a11291c
feat: send notification if account id is valid email (#293)
bearaujus May 7, 2026
0540843
feat: introduce parallel approvers (#294)
lifosmin May 13, 2026
b433832
fix: merge additional stages first (#296)
lifosmin May 19, 2026
36f2e2c
feat(shield): create team resource type (#292)
lifosmin May 20, 2026
2ba565a
fix: shield client cache error (#299)
lifosmin May 21, 2026
087a59e
fix: phantom approved appeal (#300)
lifosmin May 25, 2026
471cddf
fix: check permission logic (#301)
lifosmin May 25, 2026
f6b45e7
chore: single load each table in case batch load fails (#302)
anjali9791 May 26, 2026
7ec80e9
fix: appeal is approved when grant is not created
May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
run: cd docs && yarn build
- name: Deploy docs
env:
GIT_USER: ravisuhag
GIT_USER: anshuman-gojek
GIT_PASS: ${{ secrets.DOCU_RS_TOKEN }}
DEPLOYMENT_BRANCH: gh-pages
CURRENT_BRANCH: main
working-directory: docs
run: |
git config --global user.email "suhag.ravi@gmail.com"
git config --global user.name "ravisuhag"
git config --global user.email "anshuman.srivastava@gojek.com"
git config --global user.name "anshuman-gojek"
yarn deploy
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.18"
go-version: "1.21"
- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand All @@ -27,7 +27,7 @@ jobs:
uses: goreleaser/goreleaser-action@v2.6.1
with:
distribution: goreleaser
version: latest
version: v1.26.2
args: --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: "1.18"
go-version: "1.21"
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.59
skip-go-installation: true
test:
strategy:
matrix:
go-version: [1.18.x]
go-version: [1.21.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
21 changes: 1 addition & 20 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,9 @@ vendor/

tmp

# git ignore generate files related to gRPC and proto
/proton/
/api/proto/odpf/**/*

!/api/proto/odpf/guardian/v1beta1/
!/api/proto/odpf/guardian/v1beta1/*
!/api/proto/odpf/guardian/v1beta1/**/*

!/api/proto/odpf/third_party/
!/api/proto/odpf/third_party/googleapis/
!/api/proto/odpf/third_party/googleapis/*
!/api/proto/odpf/third_party/googleapis/**/*
!/api/proto/odpf/third_party/grpc-gateway/
!/api/proto/odpf/third_party/grpc-gateway/*
!/api/proto/odpf/third_party/grpc-gateway/**/*

/third_party/*
!/third_party/OpenAPI/odpf/guardian/guardian.swagger.json

# guardian
.guardian.yaml
guardian
api/proto/gotocompany/guardian/
dist/

# editor configurations
Expand Down
9 changes: 5 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
run:
timeout: 5m
skip-dirs:
- api/proto
output:
format: line-number
formats:
- format: line-number
linters:
enable-all: false
disable-all: true
enable:
- vet
- govet
- goimports
- thelper
- tparallel
Expand All @@ -25,5 +24,7 @@ linters-settings:
severity: warning
issues:
fix: true
exclude-dirs:
- api/proto
severity:
default-severity: error
50 changes: 28 additions & 22 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,24 @@ builds:
flags:
- -a
ldflags:
- -X github.com/odpf/guardian/core.Version={{.Tag}}
- -X github.com/odpf/guardian/core.BuildCommit={{.FullCommit}}
- -X github.com/odpf/guardian/core.BuildDate={{.Date}}
- -X github.com/goto/guardian/core.Version={{.Tag}}
- -X github.com/goto/guardian/core.BuildCommit={{.FullCommit}}
- -X github.com/goto/guardian/core.BuildDate={{.Date}}
goos: [darwin, linux, windows]
goarch: [amd64, 386, arm, arm64]
env:
- CGO_ENABLED=0
archives:
- replacements:
darwin: macos
linux: linux
windows: windows
386: i386
amd64: x86_64
- name_template: >-
{{- .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else if eq .Arch "linux" }}linux
{{- else if eq .Arch "windows" }}windows
{{- else if eq .Arch "darwin" }}macos
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip
Expand All @@ -47,32 +51,34 @@ dockers:
- guardian
dockerfile: Dockerfile
image_templates:
- "docker.io/odpf/{{.ProjectName}}:latest"
- "docker.io/odpf/{{.ProjectName}}:{{ .Version }}"
- "docker.io/odpf/{{.ProjectName}}:{{ .Tag }}-amd64"
- "docker.io/gotocompany/{{.ProjectName}}:latest"
- "docker.io/gotocompany/{{.ProjectName}}:{{ .Version }}"
- "docker.io/gotocompany/{{.ProjectName}}:{{ .Tag }}-amd64"
nfpms:
- maintainer: ODPF
- maintainer: gotocompany
description: Universal data access tool
homepage: https://github.com/odpf/guardian
homepage: https://github.com/goto/guardian
license: Apache 2.0
formats:
- deb
- rpm
replacements:
darwin: macOS
file_name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "darwin" }}macos{{- else }}{{ .Arch }}{{ end }}
scoop:
bucket:
owner: odpf
owner: goto
name: scoop-bucket
homepage: "https://github.com/odpf/guardian"
homepage: "https://github.com/goto/guardian"
description: "Universal data access tool"
license: Apache 2.0
brews:
- name: guardian
homepage: "https://github.com/odpf/guardian"
homepage: "https://github.com/goto/guardian"
description: "Universal data access tool"
tap:
owner: odpf
owner: goto
name: homebrew-tap
license: "Apache 2.0"
folder: Formula
Expand All @@ -81,5 +87,5 @@ brews:
install: |-
bin.install "guardian"
commit_author:
name: Ravi Suhag
email: suhag.ravi@gmail.com
name: github-actions[bot]
email: 41898282+github-actions[bot]@users.noreply.github.com
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ RUN apk add openssl

RUN apk add --no-cache ca-certificates && update-ca-certificates

# odps package has an unhandled (panicking) error that requires this pkg to be installed to avoid the panic:
# https://github.com/aliyun/aliyun-odps-go-sdk/blob/master/odps/restclient/rest_client.go#L171
# https://github.com/aliyun/aliyun-odps-go-sdk/blob/master/odps/common/http_const.go#L38
RUN apk --no-cache add tzdata

RUN curl --output /usr/local/share/ca-certificates/SectigoRSADomainValidationSecureServerCA.crt http://crt.sectigo.com/SectigoRSADomainValidationSecureServerCA.crt

RUN openssl x509 -inform DER -in /usr/local/share/ca-certificates/SectigoRSADomainValidationSecureServerCA.crt -out /usr/local/share/ca-certificates/SectigoRSADomainValidationSecureServerCA.pem -text
Expand Down
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
NAME="github.com/odpf/guardian"
NAME="github.com/goto/guardian"
COMMIT := $(shell git rev-parse --short HEAD)
TAG := "$(shell git rev-list --tags --max-count=1)"
VERSION := "$(shell git describe --tags ${TAG})-next"
BUILD_DIR=dist
PROTON_COMMIT := "b9b0deda4ba141084b1741805a1682e26e2a2e74"
PROTON_COMMIT := "f955ad19a0d18b75c5207b0660e8d345ade496b3"

.PHONY: all build clean test tidy vet proto setup format generate

Expand Down Expand Up @@ -32,6 +32,10 @@ clean: tidy
test:
go test ./... -race -coverprofile=coverage.out

test-short:
@echo "Running short tests by disabling store tests..."
go test ./... -race -short -coverprofile=coverage.out

coverage: test
@echo "Generating coverage report..."
@go tool cover -html=coverage.out
Expand All @@ -40,6 +44,8 @@ build:
@echo "Building guardian version ${VERSION}..."
go build -ldflags "-X ${NAME}/core.Version=${VERSION} -X ${NAME}/core.BuildCommit=${COMMIT}" -o dist/guardian .
@echo "Build complete"
# tips: how to build from local .proto file
# buf generate path/to/file.proto --template buf.gen.yaml

buildr: setup
goreleaser --snapshot --skip-publish --rm-dist
Expand All @@ -59,19 +65,21 @@ config:
@cp internal/server/config.yaml config.yaml

proto:
@echo "Generating protobuf from odpf/proton"
@echo " [info] make sure correct version of dependencies are installed using 'make install'"
@buf generate https://github.com/odpf/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path odpf/guardian
@echo "Generating protobuf from goto/proton"
@echo " [info] make sure correct version of dependencies are installed using 'make setup'"
@buf generate https://github.com/goto/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path gotocompany/guardian
@echo "Protobuf compilation finished"

setup:
@echo "Installing dependencies..."
go mod tidy
go mod download
go get google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
go get github.com/golang/protobuf/proto@v1.5.2
go get github.com/golang/protobuf/protoc-gen-go@v1.5.2
go get google.golang.org/grpc@v1.40.0
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1.0
go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.5.0
go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.5.0
go get github.com/bufbuild/buf/cmd/buf@v0.54.1
go get github.com/bufbuild/buf/cmd/buf@v1.15.1
go get github.com/vektra/mockery/v2@v2.40.2
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59
Loading