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

0.6.1 #56

Merged
merged 40 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d6190ce
[ci] fix disabled github release
zachmann Jan 17, 2023
73fb216
bump version
zachmann Jan 17, 2023
1e10a46
update changelog
zachmann Jan 17, 2023
88d6067
fail on restrictions error
zachmann Jan 19, 2023
c7013a1
Bump golang.org/x/net from 0.0.0-20220906165146-f3363e06e74c to 0.10.0
dependabot[bot] May 9, 2023
deb1eac
Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2
dependabot[bot] May 18, 2023
914ea05
add revoke for momid
zachmann Jun 16, 2023
e8e90e6
install example config not into /etc but into /usr/share/doc
zachmann Jul 31, 2023
22c7ae1
goreleaser fix deprecated parameter
zachmann Jul 31, 2023
64db1e3
[ci] fix goreleaser package names
zachmann Aug 10, 2023
38ab0a8
[ci] fix ci
zachmann Feb 12, 2024
45f59c1
[ci] add codebase sync
zachmann Feb 12, 2024
2a476d2
Merge pull request #40 from oidc-mytoken/dependabot/go_modules/github…
zachmann May 13, 2024
d13eb87
Merge pull request #38 from oidc-mytoken/dependabot/go_modules/golang…
zachmann May 13, 2024
9811574
Bump golang.org/x/net from 0.10.0 to 0.23.0
dependabot[bot] May 13, 2024
a7f97c4
Merge pull request #43 from oidc-mytoken/dependabot/go_modules/golang…
zachmann May 13, 2024
de8b53d
use go 1.22
zachmann May 13, 2024
c168533
go mod tidy
zachmann May 13, 2024
5ac8daf
Bump google.golang.org/protobuf from 1.28.0 to 1.33.0
dependabot[bot] May 13, 2024
0749abf
Bump golang.org/x/term from 0.8.0 to 0.20.0
dependabot[bot] May 13, 2024
8f504cf
[ci] staticcheck go 1.22
zachmann May 13, 2024
1ccbe9d
Merge pull request #44 from oidc-mytoken/dependabot/go_modules/golang…
zachmann May 13, 2024
1bbc6f6
Merge pull request #45 from oidc-mytoken/dependabot/go_modules/google…
zachmann May 13, 2024
2d43fef
Bump golang.org/x/net from 0.23.0 to 0.25.0
dependabot[bot] May 13, 2024
bf33769
Bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3
dependabot[bot] May 13, 2024
2875523
Merge pull request #50 from oidc-mytoken/dependabot/go_modules/github…
zachmann May 13, 2024
c09003e
Merge pull request #49 from oidc-mytoken/dependabot/go_modules/golang…
zachmann May 13, 2024
f16d446
Bump github.com/gliderlabs/ssh from 0.3.5 to 0.3.7
dependabot[bot] May 13, 2024
c53aea0
Merge pull request #47 from oidc-mytoken/dependabot/go_modules/github…
zachmann May 14, 2024
c185656
Bump github.com/mdp/qrterminal/v3 from 3.0.0 to 3.2.0
dependabot[bot] May 14, 2024
763dc92
Merge pull request #46 from oidc-mytoken/dependabot/go_modules/github…
zachmann May 14, 2024
9b1cf0c
Bump golang.org/x/term from 0.20.0 to 0.22.0
dependabot[bot] Jul 5, 2024
a4221b7
only connect to mytoken server after the mytoken server is extracted …
zachmann Jul 31, 2024
62e40b0
Merge pull request #55 from oidc-mytoken/dependabot/go_modules/golang…
zachmann Jul 31, 2024
982b34e
Bump golang.org/x/net from 0.25.0 to 0.27.0
dependabot[bot] Jul 31, 2024
c4c4787
update lib and api
zachmann Jul 31, 2024
d4aa5e9
Merge pull request #54 from oidc-mytoken/dependabot/go_modules/golang…
zachmann Jul 31, 2024
67f8aa3
update changelog
zachmann Jul 31, 2024
4e503bc
LICENSE
zachmann Jul 31, 2024
e11cab9
fix SetMytokenServer
zachmann Jul 31, 2024
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
22 changes: 22 additions & 0 deletions .github/workflows/codebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: codebase-sync

on:
- push
- delete

jobs:
sync:
runs-on: ubuntu-latest
name: Git Repo Sync
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wangchucheng/[email protected]
with:
# Such as https://github.com/wangchucheng/git-repo-sync.git
target-url: https://codebase.helmholtz.cloud/m-team/oidc/mytoken/client.git
# Such as wangchucheng
target-username: gabriel.zachmann
# You can store token in your project's 'Setting > Secrets' and reference the name here. Such as ${{ secrets.ACCESS_TOKEN }}
target-token: ${{ secrets.CODEBASE_TOKEN }}
10 changes: 1 addition & 9 deletions .gitlab-ci-scripts/goreleaser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,5 @@ if [ -n "$CI_COMMIT_TAG" ] && echo "$CI_COMMIT_TAG" | grep -qv '~'; then
GORELEASER_CONFIG=".goreleaser-release.yml"
fi
BASEDIR=/go/src/github.com/oidc-mytoken/client
docker run --rm --privileged \
-v "$PWD":"$BASEDIR" \
-w "$BASEDIR" \
-v "${PWD}/../shared":/tmp/shared \
-v /var/run/docker.sock:/var/run/docker.sock \
-e DOCKER_USERNAME -e DOCKER_PASSWORD \
-e GITHUB_TOKEN \
-e GORELEASER_CONFIG \
goreleaser/goreleaser release -f $GORELEASER_CONFIG --release-notes /tmp/shared/release.md
goreleaser release -f $GORELEASER_CONFIG --release-notes ../shared/release.md
ls -l results
20 changes: 15 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
image: golang:1.16
include:
- 'https://codebase.helmholtz.cloud/m-team/tools/ci-voodoo/-/raw/master/ci-include/github-status-sync.yml'

variables:
UPSTREAM_PROJECT: oidc-mytoken/client

image: golang:1.22
stages:
- build
- test
Expand Down Expand Up @@ -28,7 +34,7 @@ test_race:
- go test -race -v ./...

staticcheck:
image: golang:1.19
image: golang:1.22
stage: lint
before_script:
- go install honnef.co/go/tools/cmd/staticcheck@latest
Expand All @@ -48,7 +54,8 @@ build:
prerelease:
stage: release
image:
name: docker:stable
name: goreleaser/goreleaser
entrypoint: [""]
services:
- docker:dind
only:
Expand All @@ -62,9 +69,12 @@ prerelease:
GIT_DEPTH: 0
REPO_HOST: repo.data.kit.edu
REPO_USER: cicd
DOCKER_REGISTRY: https://index.docker.io/v1/
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin "$DOCKER_REGISTRY"
script:
- if [ -z "$CI_COMMIT_TAG" ]; then docker run --rm -v $PWD:/tmp/mytoken -w /tmp/mytoken bitnami/git .gitlab-ci-scripts/set-prerel-version.sh; fi;
- if [ -z "$CI_COMMIT_TAG" ]; then .gitlab-ci-scripts/set-prerel-version.sh; fi;
- .gitlab-ci-scripts/goreleaser.sh
- .gitlab-ci-scripts/upload.sh
after_script:
- docker run --rm curlimages/curl -d "repo=github.com/oidc-mytoken/client" https://goreportcard.com/checks
- curl -d "repo=github.com/oidc-mytoken/client" https://goreportcard.com/checks
25 changes: 12 additions & 13 deletions .goreleaser-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ builds:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- replacements:
darwin: macOS
386: 32-bit
amd64: 64-bit
- name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{ if eq .Os "darwin" }}macOS{{- else }}{{ .Os }}{{ end }}_
{{- if eq .Arch "386" }}32-bit{{- else if eq .Arch "amd64" }}64-bit{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip
nfpms:
- id: client-pkg
package_name: mytoken
replacements:
386: i386
file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}"
file_name_template: >-
{{ .PackageName }}_{{ .Version }}_
{{- if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}
builds:
- client
homepage: https://mytoken-docs.data.kit.edu/
Expand All @@ -42,18 +42,18 @@ nfpms:
formats:
- deb
- rpm
release: 1
release: "1"
section: misc
bindir: /usr/bin
contents:
- src: config/example-config.yaml
dst: /etc/mytoken/example-config.yaml
dst: /usr/share/doc/mytoken/example-config.yaml
type: config
overrides:
rpm:
replacements:
amd64: x86_64
file_name_template: "{{ .PackageName }}-{{ .Version }}.{{ .Arch }}"
file_name_template: >-
{{ .PackageName }}-{{ .Version }}.
{{- if eq .Arch "386" }}i386{{- else if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
dockers:
- goos: linux
goarch: amd64
Expand All @@ -77,7 +77,6 @@ checksum:
snapshot:
name_template: "{{ .Tag }}-next"
release:
disable: true
prerelease: auto
draft: true
github:
Expand Down
24 changes: 12 additions & 12 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ builds:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- replacements:
darwin: macOS
386: 32-bit
amd64: 64-bit
- name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{ if eq .Os "darwin" }}macOS{{- else }}{{ .Os }}{{ end }}_
{{- if eq .Arch "386" }}32-bit{{- else if eq .Arch "amd64" }}64-bit{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip
nfpms:
- id: client-pkg
package_name: mytoken
replacements:
386: i386
file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}"
file_name_template: >-
{{ .PackageName }}_{{ .Version }}_
{{- if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}
builds:
- client
homepage: https://mytoken-docs.data.kit.edu/
Expand All @@ -42,18 +42,18 @@ nfpms:
formats:
- deb
- rpm
release: 1
release: "1"
section: misc
bindir: /usr/bin
contents:
- src: config/example-config.yaml
dst: /etc/mytoken/example-config.yaml
dst: /usr/share/doc/mytoken/example-config.yaml
type: config
overrides:
rpm:
replacements:
amd64: x86_64
file_name_template: "{{ .PackageName }}-{{ .Version }}.{{ .Arch }}"
file_name_template: >-
{{ .PackageName }}-{{ .Version }}.
{{- if eq .Arch "386" }}i386{{- else if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
dockers:
- goos: linux
goarch: amd64
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@

## mytoken 0.6.0 PREREL
## mytoken 0.6.1
- Fail on restrictions error
- Added possibility to revoke tokens by `mom_id`
- Updated lib / api
- Updated dependecies
- Don't fail if defult mytoken server is down but another JWT is used.

## mytoken 0.6.0

### Breaking Changes
- Support for local profiles / templates is dropped. Instead, support for server profiles is added.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2023 Gabriel Zachmann
Copyright (c) 2020-2024 Gabriel Zachmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
41 changes: 33 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,46 @@
module github.com/oidc-mytoken/client

go 1.16
go 1.22

require (
github.com/Songmu/prompter v0.5.1
github.com/gliderlabs/ssh v0.3.5
github.com/mdp/qrterminal/v3 v3.0.0
github.com/oidc-mytoken/api v0.10.0
github.com/oidc-mytoken/lib v0.7.0
github.com/gliderlabs/ssh v0.3.7
github.com/mdp/qrterminal/v3 v3.2.0
github.com/oidc-mytoken/api v0.11.1
github.com/oidc-mytoken/lib v0.7.1
github.com/oidc-mytoken/utils v0.1.2
github.com/olekukonko/tablewriter v0.0.5
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.0
github.com/sirupsen/logrus v1.9.3
github.com/urfave/cli/v2 v2.3.1-0.20211205195634-e8d81738896c
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
golang.org/x/net v0.27.0
golang.org/x/term v0.22.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
github.com/coreos/go-oidc/v3 v3.4.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/go-resty/resty/v2 v2.7.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.41.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 // indirect
golang.org/x/sys v0.22.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
rsc.io/qr v0.2.0 // indirect
)

replace github.com/urfave/cli/v2 => github.com/zachmann/cli/v2 v2.3.1-0.20211220102037-d619fd40a704
Loading
Loading