Skip to content

Commit

Permalink
feat: migrate to gotocompany (#1)
Browse files Browse the repository at this point in the history
* feat: migrate to gotocompany

* feat: migrate to gotocompany

* feat: change code owners

* fix: change user for docs

* fix: remove odpf proto

* Update Makefile

Co-authored-by: Sushmith <[email protected]>

* Update README.md

Co-authored-by: Sushmith <[email protected]>

* Update README.md

Co-authored-by: Sushmith <[email protected]>

* Update README.md

Co-authored-by: Sushmith <[email protected]>

* fix: test workflow

* fix: gitignore

* fix: add proto

* fix: add proto

* chore: remove code owners

* ci: fix lint install private

* fix: update .goreleaser.yaml maintainer

Co-authored-by: Abduh <[email protected]>

* fix: private repo workflow

---------

Co-authored-by: Abduh <[email protected]>
Co-authored-by: Sushmith <[email protected]>

* chore: update workflow credentials

Co-authored-by: Abduh <[email protected]>

* chore: remove private repo workaround

Co-authored-by: Abduh <[email protected]>

* chore: reenable coveralls

Co-authored-by: Abduh <[email protected]>

* chore: change credentials for brew commit author

Co-authored-by: Abduh <[email protected]>

* fix: fix salt version

* docs: add notice file

* chore: delete NOTICE file

---------

Co-authored-by: Haveiss <[email protected]>
Co-authored-by: Abduh <[email protected]>
Co-authored-by: Sushmith <[email protected]>
  • Loading branch information
4 people authored Mar 14, 2023
1 parent 3b152ad commit 410d94e
Show file tree
Hide file tree
Showing 222 changed files with 6,230 additions and 3,007 deletions.
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
19 changes: 0 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,6 @@ 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
Expand Down
28 changes: 14 additions & 14 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ 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:
Expand Down Expand Up @@ -47,13 +47,13 @@ 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
Expand All @@ -62,17 +62,17 @@ nfpms:
darwin: macOS
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 +81,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
8 changes: 4 additions & 4 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 := "561323badd70e4321bf868b667d8da3d90fb208b"

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

Expand Down Expand Up @@ -59,9 +59,9 @@ config:
@cp internal/server/config.yaml config.yaml

proto:
@echo "Generating protobuf from odpf/proton"
@echo "Generating protobuf from goto/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
@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:
Expand Down
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Guardian

![test workflow](https://github.com/odpf/guardian/actions/workflows/test.yaml/badge.svg)
![release workflow](https://github.com/odpf/guardian/actions/workflows/release.yaml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/odpf/guardian/badge.svg?branch=main)](https://coveralls.io/github/odpf/guardian?branch=main)
![test workflow](https://github.com/goto/guardian/actions/workflows/test.yaml/badge.svg)
![release workflow](https://github.com/goto/guardian/actions/workflows/release.yaml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/goto/guardian/badge.svg?branch=main)](https://coveralls.io/github/goto/guardian?branch=main)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?logo=apache)](LICENSE)
[![Version](https://img.shields.io/github/v/release/odpf/guardian?logo=semantic-release)](Version)
[![Version](https://img.shields.io/github/v/release/goto/guardian?logo=semantic-release)](Version)

Guardian is a on-demand access management tool. It manages resources from various data providers along with the users’ access. Users required to raise an appeal in order to gain access to a particular resource. The appeal will go through several approvals before it is getting approved and granted the access to the user.

Expand All @@ -22,27 +22,27 @@ Guardian is a on-demand access management tool. It manages resources from variou

Explore the following resoruces to get started with Guardian:

- [Guides](https://odpf.github.io/guardian/docs/tour/introduction) provides guidance on usage.
- [Concepts](https://odpf.github.io/guardian/docs/concepts/overview) describes all important Guardian concepts including system architecture.
- [Reference](https://odpf.github.io/guardian/docs/reference/api) contains details about configurations and other aspects of Guardian.
- [Contribute](https://odpf.github.io/guardian/docs/contribute/contribution) contains resources for anyone who wants to contribute to Guardian.
- [Guides](https://goto.github.io/guardian/docs/tour/introduction) provides guidance on usage.
- [Concepts](https://goto.github.io/guardian/docs/concepts/overview) describes all important Guardian concepts including system architecture.
- [Reference](https://goto.github.io/guardian/docs/reference/api) contains details about configurations and other aspects of Guardian.
- [Contribute](https://goto.github.io/guardian/docs/contribute/contribution) contains resources for anyone who wants to contribute to Guardian.

## Installation

Install Guardian on macOS, Windows, Linux, OpenBSD, FreeBSD, and on any machine. <br/>Refer this for [installations](https://odpf.github.io/guardian/docs/installation) and [configurations](https://odpf.github.io/guardian/docs/tour/configuration)
Install Guardian on macOS, Windows, Linux, OpenBSD, FreeBSD, and on any machine. <br/>Refer this for [installations](https://goto.github.io/guardian/docs/installation) and [configurations](https://goto.github.io/guardian/docs/tour/configuration)

#### Binary (Cross-platform)

Download the appropriate version for your platform from [releases](https://github.com/odpf/guardian/releases) page. Once downloaded, the binary can be run from anywhere.
Download the appropriate version for your platform from [releases](https://github.com/goto/guardian/releases) page. Once downloaded, the binary can be run from anywhere.
You don’t need to install it into a global location. This works well for shared hosts and other systems where you don’t have a privileged account.
Ideally, you should install it somewhere in your PATH for easy use. `/usr/local/bin` is the most probable location.

#### macOS

`guardian` is available via a Homebrew Tap, and as downloadable binary from the [releases](https://github.com/odpf/guardian/releases/latest) page:
`guardian` is available via a Homebrew Tap, and as downloadable binary from the [releases](https://github.com/goto/guardian/releases/latest) page:

```sh
brew install odpf/tap/guardian
brew install goto/tap/guardian
```

To upgrade to the latest version:
Expand All @@ -59,14 +59,14 @@ guardian version

#### Linux

`guardian` is available as downloadable binaries from the [releases](https://github.com/odpf/guardian/releases/latest) page. Download the `.deb` or `.rpm` from the releases page and install with `sudo dpkg -i` and `sudo rpm -i` respectively.
`guardian` is available as downloadable binaries from the [releases](https://github.com/goto/guardian/releases/latest) page. Download the `.deb` or `.rpm` from the releases page and install with `sudo dpkg -i` and `sudo rpm -i` respectively.

#### Windows

`guardian` is available via [scoop](https://scoop.sh/), and as a downloadable binary from the [releases](https://github.com/odpf/guardian/releases/latest) page:
`guardian` is available via [scoop](https://scoop.sh/), and as a downloadable binary from the [releases](https://github.com/goto/guardian/releases/latest) page:

```
scoop bucket add guardian https://github.com/odpf/scoop-bucket.git
scoop bucket add guardian https://github.com/goto/scoop-bucket.git
```

To upgrade to the latest version:
Expand All @@ -80,13 +80,13 @@ scoop update guardian
We provide ready to use Docker container images. To pull the latest image:

```
docker pull odpf/guardian:latest
docker pull gotocompany/guardian:latest
```

To pull a specific version:

```
docker pull odpf/guardian:v0.3.2
docker pull gotocompany/guardian:v0.3.2
```

## Usage
Expand All @@ -111,7 +111,7 @@ guardian reference

#### API

Guardian provides a fully-featured GRPC and HTTP API to interact with Guardian server. Both APIs adheres to a set of standards that are rigidly followed. Please refer to [proton](https://github.com/odpf/proton/tree/main/odpf/guardian/v1beta1) for GRPC API definitions.
Guardian provides a fully-featured GRPC and HTTP API to interact with Guardian server. Both APIs adheres to a set of standards that are rigidly followed. Please refer to [proton](https://github.com/goto/proton/tree/main/gotocompany/guardian/v1beta1) for GRPC API definitions.

## Running locally

Expand All @@ -127,7 +127,7 @@ Guardian provides a fully-featured GRPC and HTTP API to interact with Guardian s
Clone the repo

```
git clone [email protected]:odpf/guardian.git
git clone [email protected]:goto/guardian.git
```

Install all the golang dependencies
Expand Down Expand Up @@ -185,14 +185,14 @@ make coverage
Development of Guardian happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and
improvements. Read below to learn how you can take part in improving Guardian.

Read our [contributing guide](https://odpf.github.io/guardian/docs/contribute/contribution) to learn about our development process, how to propose
Read our [contributing guide](https://goto.github.io/guardian/docs/contribute/contribution) to learn about our development process, how to propose
bugfixes and improvements, and how to build and test your changes to Guardian.

To help you get your feet wet and get you familiar with our contribution process, we have a list of
[good first issues](https://github.com/odpf/guardian/labels/good%20first%20issue) that contain bugs which have a relatively
[good first issues](https://github.com/goto/guardian/labels/good%20first%20issue) that contain bugs which have a relatively
limited scope. This is a great place to get started.

This project exists thanks to all the [contributors](https://github.com/odpf/guardian/graphs/contributors).
This project exists thanks to all the [contributors](https://github.com/goto/guardian/graphs/contributors).

## License

Expand Down
6 changes: 3 additions & 3 deletions api/handler/v1beta1/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"

guardianv1beta1 "github.com/odpf/guardian/api/proto/odpf/guardian/v1beta1"
"github.com/odpf/guardian/core/activity"
"github.com/odpf/guardian/domain"
guardianv1beta1 "github.com/goto/guardian/api/proto/gotocompany/guardian/v1beta1"
"github.com/goto/guardian/core/activity"
"github.com/goto/guardian/domain"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
4 changes: 2 additions & 2 deletions api/handler/v1beta1/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package v1beta1
import (
"fmt"

guardianv1beta1 "github.com/goto/guardian/api/proto/gotocompany/guardian/v1beta1"
"github.com/goto/guardian/domain"
"github.com/mitchellh/mapstructure"
guardianv1beta1 "github.com/odpf/guardian/api/proto/odpf/guardian/v1beta1"
"github.com/odpf/guardian/domain"
"google.golang.org/protobuf/types/known/structpb"
"google.golang.org/protobuf/types/known/timestamppb"
)
Expand Down
6 changes: 3 additions & 3 deletions api/handler/v1beta1/appeal.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"

guardianv1beta1 "github.com/odpf/guardian/api/proto/odpf/guardian/v1beta1"
"github.com/odpf/guardian/core/appeal"
"github.com/odpf/guardian/domain"
guardianv1beta1 "github.com/goto/guardian/api/proto/gotocompany/guardian/v1beta1"
"github.com/goto/guardian/core/appeal"
"github.com/goto/guardian/domain"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
6 changes: 3 additions & 3 deletions api/handler/v1beta1/appeal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"errors"
"time"

guardianv1beta1 "github.com/odpf/guardian/api/proto/odpf/guardian/v1beta1"
"github.com/odpf/guardian/core/appeal"
"github.com/odpf/guardian/domain"
guardianv1beta1 "github.com/goto/guardian/api/proto/gotocompany/guardian/v1beta1"
"github.com/goto/guardian/core/appeal"
"github.com/goto/guardian/domain"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
Expand Down
6 changes: 3 additions & 3 deletions api/handler/v1beta1/approval.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"

guardianv1beta1 "github.com/odpf/guardian/api/proto/odpf/guardian/v1beta1"
"github.com/odpf/guardian/core/appeal"
"github.com/odpf/guardian/domain"
guardianv1beta1 "github.com/goto/guardian/api/proto/gotocompany/guardian/v1beta1"
"github.com/goto/guardian/core/appeal"
"github.com/goto/guardian/domain"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
6 changes: 3 additions & 3 deletions api/handler/v1beta1/approval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"time"

"github.com/google/uuid"
guardianv1beta1 "github.com/odpf/guardian/api/proto/odpf/guardian/v1beta1"
"github.com/odpf/guardian/core/appeal"
"github.com/odpf/guardian/domain"
guardianv1beta1 "github.com/goto/guardian/api/proto/gotocompany/guardian/v1beta1"
"github.com/goto/guardian/core/appeal"
"github.com/goto/guardian/domain"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
Expand Down
8 changes: 4 additions & 4 deletions api/handler/v1beta1/grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"errors"

guardianv1beta1 "github.com/odpf/guardian/api/proto/odpf/guardian/v1beta1"
"github.com/odpf/guardian/core/grant"
"github.com/odpf/guardian/core/provider"
"github.com/odpf/guardian/domain"
guardianv1beta1 "github.com/goto/guardian/api/proto/gotocompany/guardian/v1beta1"
"github.com/goto/guardian/core/grant"
"github.com/goto/guardian/core/provider"
"github.com/goto/guardian/domain"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
6 changes: 3 additions & 3 deletions api/handler/v1beta1/grant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"errors"
"time"

guardianv1beta1 "github.com/odpf/guardian/api/proto/odpf/guardian/v1beta1"
"github.com/odpf/guardian/core/grant"
"github.com/odpf/guardian/domain"
guardianv1beta1 "github.com/goto/guardian/api/proto/gotocompany/guardian/v1beta1"
"github.com/goto/guardian/core/grant"
"github.com/goto/guardian/domain"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
8 changes: 4 additions & 4 deletions api/handler/v1beta1/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"context"
"strings"

"github.com/odpf/guardian/core/appeal"
"github.com/odpf/guardian/core/grant"
"github.com/goto/guardian/core/appeal"
"github.com/goto/guardian/core/grant"

guardianv1beta1 "github.com/odpf/guardian/api/proto/odpf/guardian/v1beta1"
"github.com/odpf/guardian/domain"
guardianv1beta1 "github.com/goto/guardian/api/proto/gotocompany/guardian/v1beta1"
"github.com/goto/guardian/domain"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
4 changes: 2 additions & 2 deletions api/handler/v1beta1/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package v1beta1_test
import (
"testing"

"github.com/odpf/guardian/api/handler/v1beta1"
"github.com/odpf/guardian/api/handler/v1beta1/mocks"
"github.com/goto/guardian/api/handler/v1beta1"
"github.com/goto/guardian/api/handler/v1beta1/mocks"
"github.com/stretchr/testify/suite"
)

Expand Down
2 changes: 1 addition & 1 deletion api/handler/v1beta1/mocks/activityService.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 410d94e

Please sign in to comment.