Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish manifest for todo #159

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
151be62
upd test-cmd (#122)
gertd Sep 1, 2023
061dbb2
Add example of edge authorizer configuration
carabasdaniel Sep 7, 2023
fae5367
Merge pull request #123 from aserto-dev/docs_update
carabasdaniel Sep 7, 2023
38ca765
Do not prepare edge ds if not configured
carabasdaniel Sep 7, 2023
f982db7
Add openAPI spec handler for all servers
carabasdaniel Sep 7, 2023
dd5999e
Merge pull request #124 from aserto-dev/edge_ds_init_fix
carabasdaniel Sep 8, 2023
15d0801
topaz cli updates (#126)
gertd Sep 13, 2023
bb191b2
update goreleaser to v1.20.0 (#127)
gertd Sep 13, 2023
de1348d
missed version update
gertd Sep 13, 2023
293a135
get relation directionality (#128)
gertd Sep 19, 2023
22fda7e
Viper env key replacer should replace . not -
BogdanIrimie Sep 20, 2023
38b187a
Merge pull request #129 from aserto-dev/viper-env-vars
carabasdaniel Sep 20, 2023
9f4a047
Bump service-host to 0.0.5
BogdanIrimie Sep 20, 2023
26579b7
Merge pull request #131 from aserto-dev/bump-service-host
oanatmaria Sep 20, 2023
1c03aee
add ds.relations (#132)
gertd Sep 20, 2023
f90d0bb
Add examples for how to use environment variables (#130)
BogdanIrimie Sep 21, 2023
53620c3
add topaz version --container (#133)
gertd Sep 26, 2023
f86250e
Bump runtime to v0.56.0 (#136)
carabasdaniel Sep 27, 2023
7eddba8
importer batch mode (#137)
gertd Sep 27, 2023
aff49e4
upd deps
gertd Sep 27, 2023
1f02e2f
mage run
gertd Sep 27, 2023
0a5fefb
set exitcode when test failed or errored (#140)
gertd Sep 28, 2023
5e6b4b2
add IDENTITY_TYPE_MANUAL support (#138)
gertd Sep 28, 2023
d234810
Adding sidecar config
glennblock Oct 11, 2023
f2afcfe
remove zip
glennblock Oct 11, 2023
5ebec88
Merge pull request #145 from aserto-dev/feat/sidecar-config
glennblock Oct 11, 2023
adeec17
added role properties and manager relationship (#151)
ogazitt Oct 22, 2023
fe623be
archive deployment examples with release
apoland Oct 27, 2023
fb196f2
archive deployment examples with release
apoland Oct 27, 2023
a23fd9e
Merge pull request #155 from aserto-dev/andrew/example-assets
apoland Oct 27, 2023
d12b889
publish manifest for todo
apoland Nov 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 42 additions & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
-
-
uses: actions/checkout@v3
-
-
name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
-
-
name: Setup caching
uses: actions/cache@v3
with:
Expand All @@ -42,26 +42,26 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
-
-
name: Build
run: |
go build -o ./bin/topaz ./cmd/topaz/
go build -o ./bin/topazd ./cmd/topazd/
-
-
name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
-
-
name: Test Setup
uses: autero1/[email protected]
with:
gotestsum_version: 1.10.0
-
-
name: Test
run: |
gotestsum --format short-verbose -- -count=1 -v -timeout=240s -coverprofile=cover.out -coverpkg=./... ./...
-
-
name: Upload code coverage
uses: shogo82148/actions-goveralls@v1
continue-on-error: true
Expand All @@ -73,7 +73,7 @@ jobs:
# always push when ref is a tag
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/heads/dev-') || startsWith(github.ref, 'refs/tags/v') )
steps:
-
-
name: Read Configuration
uses: hashicorp/[email protected]
id: vault
Expand All @@ -85,16 +85,16 @@ jobs:
kv/data/github "USERNAME" | DOCKER_USERNAME;
kv/data/github "DOCKER_PUSH_TOKEN" | DOCKER_PASSWORD;
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN;
-
-
uses: actions/checkout@v3
with:
fetch-depth: 0
-
-
name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
-
-
name: Setup caching
uses: actions/cache@v3
with:
Expand All @@ -106,15 +106,15 @@ jobs:
${{ runner.os }}-go-
-
name: Setup QEMU
uses: docker/setup-qemu-action@v2
-
uses: docker/setup-qemu-action@v2
-
name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v2
with:
registry: https://ghcr.io
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
-
-
name: Docker SSH Setup
run: |
mkdir -p $HOME/.ssh
Expand All @@ -125,35 +125,35 @@ jobs:
git config --global user.name "Aserto Bot"
eval `ssh-agent`
ssh-add $HOME/.ssh/id_rsa
-
-
name: Wait for tests to succeed
uses: fountainhead/[email protected]
id: wait-for-tests
with:
token: ${{ env.READ_WRITE_TOKEN }}
checkName: test
ref: ${{ github.event.pull_request.head.sha || github.sha }}
-
-
name: Stop if tests fail
if: steps.wait-for-tests.outputs.conclusion != 'success'
run: exit 1
-
-
name: Push image to GitHub Container Registry
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: v1.18.2
version: v1.20.0
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
needs: [test, push]
runs-on: ubuntu-latest
# Only release when ref is a tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
-
-
name: Read Configuration
uses: hashicorp/[email protected]
id: vault
Expand All @@ -167,16 +167,16 @@ jobs:
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN;
kv/data/github "ASERTO_TAP" | ASERTO_TAP;
kv/data/gcp "SERVICE_ACCOUNT_GITHUB_ACTIONS_RELEASE" | SERVICE_ACCOUNT_GITHUB_ACTIONS_RELEASE;
-
-
uses: actions/checkout@v3
with:
fetch-depth: 0
-
-
name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
-
-
name: Setup caching
uses: actions/cache@v3
with:
Expand All @@ -188,8 +188,8 @@ jobs:
${{ runner.os }}-go-
-
name: Setup QEMU
uses: docker/setup-qemu-action@v2
-
uses: docker/setup-qemu-action@v2
-
name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v2
with:
Expand All @@ -215,7 +215,7 @@ jobs:
name: Write Version Info
run: |
git describe --tags > VERSION.txt
-
-
name: Release
uses: goreleaser/goreleaser-action@v4
env:
Expand All @@ -224,9 +224,22 @@ jobs:
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gs.json
with:
distribution: goreleaser
version: v1.18.2
version: v1.20.0
args: release --clean


- name: Archive deployment examples
run: |
cd assets/sidecar-deployment && zip topaz_deployment_examples.zip *.yaml

- name: Upload deployment examples
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: assets/sidecar-deployment
asset_name: topaz_deployment_examples.zip
tag: ${{ github.ref }}
overwrite: false

msi:
needs: release
runs-on: windows-latest
Expand Down
7 changes: 3 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ builds:
archives:
# https://goreleaser.com/customization/archive/
- format: zip
rlcp: true
builds:
- topaz
- topazd
Expand All @@ -68,7 +67,7 @@ archives:
- README.md
name_template: >-
topaz_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}

checksum:
# https://goreleaser.com/customization/checksum/
name_template: "checksums.txt"
Expand Down Expand Up @@ -119,7 +118,7 @@ brews:
-
name: topaz

tap:
repository:
owner: "{{ .Env.ORG }}"
name: homebrew-tap
token: "{{ .Env.ASERTO_TAP }}"
Expand Down Expand Up @@ -163,7 +162,7 @@ dockers:
- "--label=org.opencontainers.image.source=https://github.com/{{ .Env.ORG }}/{{ .Env.REPO }}"
- "--label=org.opencontainers.image.description=Topaz Authorizer"
- "--label=org.opencontainers.image.licenses=Apache-2.0"

- use: buildx
goos: linux
goarch: arm64
Expand Down
6 changes: 3 additions & 3 deletions Depfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ go:
version: "v0.5.0"
goreleaser:
importPath: github.com/goreleaser/goreleaser
version: "v1.18.2"
version: "v1.20.0"
gotestsum:
importPath: "gotest.tools/gotestsum"
version: "v1.10.0"
version: "v1.10.1"
golangci-lint:
importPath: "github.com/golangci/golangci-lint/cmd/golangci-lint"
version: "v1.52.2"
version: "v1.53.3"
goimports:
importPath: "golang.org/x/tools/cmd/goimports"
version: "latest"
Expand Down
15 changes: 10 additions & 5 deletions assets/citadel-objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@
"properties": {
"email": "[email protected]",
"picture": "https://github.com/aserto-demo/contoso-ad-sample/raw/main/UserImages/Rick%20Sanchez.jpg",
"status": "USER_STATUS_ACTIVE"
"status": "USER_STATUS_ACTIVE",
"roles": ["admin", "evil_genius"]
}
},
{
Expand All @@ -131,7 +132,8 @@
"properties": {
"email": "[email protected]",
"picture": "https://github.com/aserto-demo/contoso-ad-sample/raw/main/UserImages/Morty%20Smith.jpg",
"status": "USER_STATUS_ACTIVE"
"status": "USER_STATUS_ACTIVE",
"roles": ["editor"]
}
},
{
Expand All @@ -141,7 +143,8 @@
"properties": {
"email": "[email protected]",
"picture": "https://github.com/aserto-demo/contoso-ad-sample/raw/main/UserImages/Summer%20Smith.jpg",
"status": "USER_STATUS_ACTIVE"
"status": "USER_STATUS_ACTIVE",
"roles": ["editor"]
}
},
{
Expand All @@ -151,7 +154,8 @@
"properties": {
"email": "[email protected]",
"picture": "https://github.com/aserto-demo/contoso-ad-sample/raw/main/UserImages/Beth%20Smith.jpg",
"status": "USER_STATUS_ACTIVE"
"status": "USER_STATUS_ACTIVE",
"roles": ["viewer"]
}
},
{
Expand All @@ -161,7 +165,8 @@
"properties": {
"email": "[email protected]",
"picture": "https://github.com/aserto-demo/contoso-ad-sample/raw/main/UserImages/Jerry%20Smith.jpg",
"status": "USER_STATUS_ACTIVE"
"status": "USER_STATUS_ACTIVE",
"roles": ["viewer"]
}
}
]
Expand Down
44 changes: 44 additions & 0 deletions assets/citadel-relations.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,50 @@
"key": "editor"
}
},
{
"subject": {
"type": "user",
"key": "[email protected]"
},
"relation": "manager",
"object": {
"type": "user",
"key": "[email protected]"
}
},
{
"subject": {
"type": "user",
"key": "[email protected]"
},
"relation": "manager",
"object": {
"type": "user",
"key": "[email protected]"
}
},
{
"subject": {
"type": "user",
"key": "[email protected]"
},
"relation": "manager",
"object": {
"type": "user",
"key": "[email protected]"
}
},
{
"subject": {
"type": "user",
"key": "[email protected]"
},
"relation": "manager",
"object": {
"type": "user",
"key": "[email protected]"
}
},
{
"subject": {
"type": "user",
Expand Down
28 changes: 28 additions & 0 deletions assets/manifest-todo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# yaml-language-server: $schema=https://www.topaz.sh/schema/manifest.json
---
### filename: manifest-v2.yaml ###
### description: migrated v2 seed model as v3 manifest ###

### model
model:
version: 3

### object type definitions
types:
### display_name: User ###
user:
relations:
### display_name: user:manager ###
manager: user

### display_name: Group ###
group:
relations:
### display_name: group:member ###
member: user | group#member

### display_name: Identity ###
identity:
relations:
### display_name: identity:identifier ###
identifier: user
Loading