Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
267 commits
Select commit Hold shift + click to select a range
93ce9c7
[web] return html instead of json on the action endpoint
zachmann Nov 17, 2023
e88193d
[web] add possibility to subscribe notifications in the webitnerface
zachmann Nov 23, 2023
9bfd274
[web] fix notification selector not updating on load
zachmann Nov 23, 2023
913bb81
[notifications] remove events for revoked (or removed) mytokens from …
zachmann Nov 23, 2023
e863379
[notifications] return 400 instead of 500 if token does not expire an…
zachmann Nov 23, 2023
7e02f4a
[web] add error-message modal to display notifications errors
zachmann Nov 24, 2023
624e646
use arran4/golang-ical again as our PR was merged
zachmann Nov 24, 2023
d786bb8
[web] disable expiration notifications for tokens that do not expire
zachmann Nov 24, 2023
998b6df
[web] cache notifications data (email status, calendars) in mytoken l…
zachmann Nov 24, 2023
a542c30
refactor events; move them to api
zachmann Nov 28, 2023
2c17ba6
refactor notification sending; dedicated notifier that can run standa…
zachmann Dec 4, 2023
609633b
implement sending of notifications on events
zachmann Dec 11, 2023
1020014
implement sending of notifications on blocked usages (capabilities, r…
zachmann Dec 12, 2023
4f79ff3
[api] add possibility to create email notifications
zachmann Dec 18, 2023
26aea36
[web] fix "A created mytoken can have the following capabilities" dis…
zachmann Dec 18, 2023
935ed48
[web] add possibility to add email notifications (for MTs) from the w…
zachmann Dec 22, 2023
6a52fab
fix notification subscribtion not done for momid token, but for auth …
zachmann Jan 3, 2024
f451532
[api] get notification request
zachmann Jan 8, 2024
964b371
[api] add delete and update notification requests
zachmann Jan 11, 2024
8c7daf4
[web] WIP add notifications management to webinterface
zachmann Jan 18, 2024
7522df5
[web] allow middle mouse click to paste text in restriction json edit…
zachmann Jan 18, 2024
f4182c9
[web] WIP notification management
zachmann Jan 19, 2024
3712985
Merge branch 'prerel' into feat/notifications
zachmann Jan 19, 2024
62d52c0
0.9.1 logos
zachmann Feb 14, 2024
36b944a
Merge branch 'prerel' into feat/notifications
zachmann Feb 16, 2024
81016b0
use remote api again
zachmann Feb 16, 2024
238ef11
fix calendar endpoints not used because notifications endpoint used i…
zachmann Feb 16, 2024
f15d411
[web] removing console logging
zachmann Feb 16, 2024
fe485c1
remove redundant return statement
zachmann Feb 16, 2024
8060c02
fix composite literal uses unkeyed fields
zachmann Feb 16, 2024
f7c7cd6
fix ics_invite
zachmann Feb 16, 2024
8e0b10a
[web] add calendar webview
zachmann Feb 22, 2024
dc3b6dd
WIP add tokeninfo notifications
zachmann Feb 23, 2024
0f4cff5
[web] improve JWT badge in tokeninfo pane
zachmann Feb 27, 2024
b61aca2
[web] add notifications info to tokeninfo pane
zachmann Feb 27, 2024
ddca143
refactor web partials
zachmann Feb 27, 2024
71089c3
add list of subscribed mytokens to calendar info responses
zachmann Feb 27, 2024
7e6dc71
[web] WIP notification management; add notification management to lis…
zachmann Mar 8, 2024
e70a6a3
[web] improve notifications management on mytoken list; add possibili…
zachmann Mar 11, 2024
0ed054d
version bump
zachmann Mar 14, 2024
fe6fa15
Bump github.com/gliderlabs/ssh from 0.3.6 to 0.3.7
dependabot[bot] Mar 19, 2024
5edd584
Bump github.com/gofiber/template/mustache/v2 from 2.0.9 to 2.0.10
dependabot[bot] Mar 21, 2024
dfe39f1
[web] add more notification management
zachmann Mar 22, 2024
e3a6ec1
Bump github.com/gofiber/template/mustache/v2 from 2.0.9 to 2.0.10 (#352)
zachmann Mar 22, 2024
7933e1e
Bump github.com/gliderlabs/ssh from 0.3.6 to 0.3.7 (#350)
zachmann Mar 22, 2024
7ab798c
Bump github.com/go-resty/resty/v2 from 2.11.0 to 2.12.0
dependabot[bot] Mar 22, 2024
ef852c8
Bump github.com/go-resty/resty/v2 from 2.11.0 to 2.12.0 (#349)
zachmann Mar 25, 2024
2c39e5d
Merge branch 'prerel' into feat/notifications
zachmann Mar 25, 2024
1079498
[web] add notification management for single notification
zachmann Mar 26, 2024
b2eae8d
Bump github.com/go-sql-driver/mysql from 1.8.0 to 1.8.1
dependabot[bot] Mar 27, 2024
91fc7bb
Bump github.com/go-sql-driver/mysql from 1.8.0 to 1.8.1 (#354)
zachmann Mar 27, 2024
612a95a
Bump github.com/gofiber/fiber/v2 from 2.52.2 to 2.52.3
dependabot[bot] Mar 27, 2024
991e1f5
Bump github.com/gofiber/fiber/v2 from 2.52.2 to 2.52.3 (#353)
zachmann Mar 27, 2024
7323fc3
Bump github.com/gofiber/fiber/v2 from 2.52.3 to 2.52.4
dependabot[bot] Mar 28, 2024
67db607
Bump github.com/gofiber/fiber/v2 from 2.52.3 to 2.52.4 (#355)
zachmann Mar 28, 2024
7580885
implement calendar remove code
zachmann Mar 28, 2024
9109179
[web] disable the 'Create new Mytoken' button when no OP is selected.
zachmann Mar 28, 2024
bdcd083
implement recreation codes
zachmann Mar 28, 2024
5ed339c
[web] fix two things in the mytoken list notification management
zachmann Apr 2, 2024
cc7294f
[web] set profile = "custom" if request is filled from query
zachmann Apr 2, 2024
9158d1e
improve / fix handling if mail not set
zachmann Apr 4, 2024
dba8fcd
fix db sql.ErrNoRows parsing
zachmann Apr 4, 2024
32100c6
fix settings event comment
zachmann Apr 4, 2024
654933c
improve ssh info error handling
zachmann Apr 4, 2024
1416595
[web] improve handling if no notifications / calendars are defined
zachmann Apr 4, 2024
3866ae7
add sql migration script
zachmann Apr 4, 2024
26f6a76
Bump golang.org/x/term from 0.18.0 to 0.19.0
dependabot[bot] Apr 5, 2024
3a94f5f
obtain email from OP and store it in db
zachmann Apr 5, 2024
6f508bd
update privacy statement
zachmann Apr 5, 2024
501e7e2
[web] improve user experience for when no notifications / email is set
zachmann Apr 5, 2024
b1aa94b
add standalone notifier server
zachmann Apr 5, 2024
b6a045c
Bump golang.org/x/term from 0.18.0 to 0.19.0 (#356)
zachmann Apr 5, 2024
ed60364
Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0
dependabot[bot] Apr 5, 2024
0589f29
Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 (#359)
zachmann Apr 5, 2024
5dde1e6
Bump golang.org/x/crypto from 0.21.0 to 0.22.0
dependabot[bot] Apr 5, 2024
293f5f4
fix Exported function returning value of unexported type
zachmann Apr 5, 2024
21d399a
Bump golang.org/x/crypto from 0.21.0 to 0.22.0 (#358)
zachmann Apr 5, 2024
e533369
Bump golang.org/x/mod from 0.16.0 to 0.17.0
dependabot[bot] Apr 5, 2024
5220140
Bump golang.org/x/mod from 0.16.0 to 0.17.0 (#357)
zachmann Apr 5, 2024
1512b1d
skipcq
zachmann Apr 5, 2024
8145bb7
remove unused method receiver
zachmann Apr 8, 2024
9e7a215
improve range variable
zachmann Apr 8, 2024
7572753
remove unnecessary dereference expression
zachmann Apr 8, 2024
2de4d1a
fix some code smells
zachmann Apr 8, 2024
642471c
refactoring
zachmann Apr 8, 2024
d7549d0
remove unused parameter
zachmann Apr 8, 2024
92772c6
refactoring
zachmann Apr 10, 2024
c070559
refactoring
zachmann Apr 10, 2024
ddf4bb6
ignore structtag in go vet
zachmann Apr 10, 2024
7099a01
fix example config
zachmann Apr 10, 2024
205ec16
Feat/notifications (#360)
zachmann Apr 10, 2024
bf2ac5b
bump go version to 1.22
zachmann Apr 11, 2024
b614f72
drop deprecated math/rand.Read
zachmann Apr 11, 2024
27bf154
bump go version to 1.22 (#363)
zachmann Apr 11, 2024
9bac4a1
Bump github.com/arran4/golang-ical from 0.2.1 to 0.2.8
dependabot[bot] Apr 11, 2024
ec221a8
Bump github.com/arran4/golang-ical from 0.2.1 to 0.2.8 (#364)
zachmann Apr 11, 2024
b4b7f34
Bump github.com/coreos/go-oidc/v3 from 3.9.0 to 3.10.0
dependabot[bot] Apr 11, 2024
717dfb2
Bump github.com/sethvargo/go-limiter from 0.7.2 to 1.0.0
dependabot[bot] Apr 11, 2024
de87373
Bump github.com/coreos/go-oidc/v3 from 3.9.0 to 3.10.0 (#351)
zachmann Apr 11, 2024
8e712b4
Bump github.com/sethvargo/go-limiter from 0.7.2 to 1.0.0 (#362)
zachmann Apr 11, 2024
e4ff398
fix updatebaleresponse with DoAfter function
zachmann Apr 11, 2024
444d44e
add new notification class for usage from an unknown ip
zachmann Apr 11, 2024
4423acb
add db migration script for events ip
zachmann Apr 12, 2024
8e1e8e9
add email expiration notifications
zachmann Apr 17, 2024
7d00911
refactoring
zachmann Apr 18, 2024
c7f665c
refactoring
zachmann Apr 18, 2024
4bce4bf
fix sql migration
zachmann Apr 18, 2024
252f5b3
code / comment improvements
zachmann Apr 18, 2024
b05086f
add email expiration notifications (#365)
zachmann Apr 18, 2024
14ba4d5
[web] add icon for expiration notification
zachmann Apr 19, 2024
f9dd52f
update changelog
zachmann Apr 19, 2024
3233b19
include subscribed tokens to addmytokentocalendar response
zachmann Apr 24, 2024
ffa5ca5
add email settings endpoint to setting endpoint metadata
zachmann Apr 26, 2024
8752d5a
remove AT rotation profile
zachmann Apr 29, 2024
47217b2
explicity set status as 200 from 204 in DoAfterRequestThingsOther if …
zachmann Apr 29, 2024
2990da0
Bump github.com/gofiber/template/mustache/v2 from 2.0.10 to 2.0.11
dependabot[bot] May 7, 2024
7057c22
Bump github.com/go-resty/resty/v2 from 2.12.0 to 2.13.1
dependabot[bot] May 13, 2024
8267d34
Bump github.com/go-resty/resty/v2 from 2.12.0 to 2.13.1 (#373)
zachmann May 14, 2024
877b625
Bump github.com/gofiber/template/mustache/v2 from 2.0.10 to 2.0.11 (#…
zachmann May 14, 2024
92295c1
Bump golang.org/x/oauth2 from 0.19.0 to 0.20.0
dependabot[bot] May 14, 2024
841673d
Bump github.com/jmoiron/sqlx from 1.3.5 to 1.4.0
dependabot[bot] May 14, 2024
86e7601
Bump golang.org/x/oauth2 from 0.19.0 to 0.20.0 (#369)
zachmann May 14, 2024
754f8f5
Bump github.com/jmoiron/sqlx from 1.3.5 to 1.4.0 (#367)
zachmann May 14, 2024
0a02273
Bump github.com/valyala/fasthttp from 1.52.0 to 1.54.0
dependabot[bot] May 24, 2024
29cdc00
Bump github.com/valyala/fasthttp from 1.52.0 to 1.54.0 (#375)
zachmann May 24, 2024
d4d0c68
refactoring
zachmann May 24, 2024
7996c68
implement enforced restrictions
zachmann May 27, 2024
4c7dd6e
allow restrictions template being specified in the config file, not o…
zachmann May 28, 2024
4c6d678
add enforced restrictions to example config file
zachmann May 28, 2024
0691f91
update readme
zachmann May 28, 2024
eb63154
add notification link to about-web
zachmann May 28, 2024
f194179
update changelog
zachmann May 28, 2024
ee875cf
logos
zachmann May 28, 2024
0844820
add prerel docker image tag
zachmann May 28, 2024
d7057fb
Bump github.com/arran4/golang-ical from 0.2.8 to 0.3.0
dependabot[bot] May 31, 2024
7c8a69f
Bump github.com/redis/go-redis/v9 from 9.5.1 to 9.5.3
dependabot[bot] Jun 10, 2024
1f3a186
Bump github.com/gofiber/template/mustache/v2 from 2.0.11 to 2.0.12
dependabot[bot] Jul 4, 2024
9ce732f
Bump golang.org/x/term from 0.20.0 to 0.22.0
dependabot[bot] Jul 5, 2024
9cecd85
Bump golang.org/x/crypto from 0.23.0 to 0.25.0
dependabot[bot] Jul 8, 2024
da170a7
Bump golang.org/x/crypto from 0.23.0 to 0.25.0 (#389)
zachmann Jul 8, 2024
bb7dd4e
Bump golang.org/x/term from 0.20.0 to 0.22.0 (#388)
zachmann Jul 8, 2024
16afd81
Bump github.com/arran4/golang-ical from 0.2.8 to 0.3.0 (#378)
zachmann Jul 8, 2024
b2a2832
Bump golang.org/x/mod from 0.17.0 to 0.19.0
dependabot[bot] Jul 8, 2024
7c15a57
Bump github.com/gofiber/template/mustache/v2 from 2.0.11 to 2.0.12 (#…
zachmann Jul 8, 2024
745ab97
Bump github.com/valyala/fasthttp from 1.54.0 to 1.55.0
dependabot[bot] Jul 8, 2024
9ebc2fd
Bump github.com/redis/go-redis/v9 from 9.5.1 to 9.5.3 (#383)
zachmann Jul 8, 2024
1176ba8
Bump golang.org/x/mod from 0.17.0 to 0.19.0 (#387)
zachmann Jul 8, 2024
c0c5928
Bump github.com/valyala/fasthttp from 1.54.0 to 1.55.0 (#384)
zachmann Jul 8, 2024
f8f6115
Bump golang.org/x/oauth2 from 0.20.0 to 0.21.0
dependabot[bot] Jul 8, 2024
1d057a3
Bump golang.org/x/oauth2 from 0.20.0 to 0.21.0 (#379)
zachmann Jul 8, 2024
bbc563a
change corp settings
zachmann Jul 8, 2024
0786e0d
fix corp settings
zachmann Jul 8, 2024
e562129
Bump github.com/coreos/go-oidc/v3 from 3.10.0 to 3.11.0
dependabot[bot] Jul 9, 2024
cbe1705
Bump github.com/coreos/go-oidc/v3 from 3.10.0 to 3.11.0 (#390)
zachmann Jul 9, 2024
763eee8
refactor complex functions
zachmann Jul 9, 2024
5de1416
fix code smell
zachmann Jul 9, 2024
2177af3
change used mysql client binary name from mysql to mariadb in order o…
zachmann Jul 10, 2024
a5bb915
Bump github.com/arran4/golang-ical from 0.3.0 to 0.3.1
dependabot[bot] Jul 11, 2024
0055df1
Bump github.com/arran4/golang-ical from 0.3.0 to 0.3.1 (#391)
zachmann Jul 11, 2024
2591f57
Bump github.com/redis/go-redis/v9 from 9.5.3 to 9.5.4
dependabot[bot] Jul 12, 2024
82e09a8
Bump github.com/redis/go-redis/v9 from 9.5.3 to 9.5.4 (#392)
zachmann Jul 12, 2024
fcd82f7
refactoring
zachmann Jul 12, 2024
39d9eb6
fix a problem when accessing rotating RTs in parallel
zachmann Jul 12, 2024
22c9bed
fix redis version
zachmann Jul 18, 2024
ee359bd
fix migratedb
zachmann Jul 18, 2024
d70f66f
add wsrep error handling
zachmann Jul 18, 2024
aa567b5
include offline_access in refresh request
zachmann Jul 24, 2024
b56d724
change prerel CD to mytoken.data.kit.edu
zachmann Jul 25, 2024
a143129
hide notifications content in web interface if notification feature n…
zachmann Jul 25, 2024
328d2b6
Bump github.com/redis/go-redis/v9 from 9.5.2 to 9.6.1
dependabot[bot] Jul 26, 2024
1adde66
Bump github.com/lestrrat-go/jwx from 1.2.29 to 1.2.30
dependabot[bot] Jul 29, 2024
418b85b
fix token name in mail notification
zachmann Jul 30, 2024
959affa
Bump golang.org/x/oauth2 from 0.21.0 to 0.22.0
dependabot[bot] Aug 5, 2024
57b809d
Bump github.com/go-resty/resty/v2 from 2.13.1 to 2.14.0
dependabot[bot] Aug 5, 2024
454cf90
Bump github.com/lestrrat-go/jwx from 1.2.29 to 1.2.30 (#396)
zachmann Aug 5, 2024
73d9e22
Bump golang.org/x/oauth2 from 0.21.0 to 0.22.0 (#398)
zachmann Aug 5, 2024
a4a47d4
Bump github.com/go-resty/resty/v2 from 2.13.1 to 2.14.0 (#399)
zachmann Aug 5, 2024
5c7bcc2
Bump github.com/redis/go-redis/v9 from 9.5.2 to 9.6.1 (#395)
zachmann Aug 5, 2024
7cf7365
Bump golang.org/x/mod from 0.19.0 to 0.20.0
dependabot[bot] Aug 5, 2024
95347fa
Bump golang.org/x/mod from 0.19.0 to 0.20.0 (#397)
zachmann Aug 5, 2024
d81ca6a
fix space needed in the db for ipv6 addresses
zachmann Aug 6, 2024
bd39cc6
improve,fix caching; update oidfed
zachmann Aug 30, 2024
56e3906
code improvement
zachmann Sep 5, 2024
7be2683
Bump golang.org/x/term from 0.22.0 to 0.24.0
dependabot[bot] Sep 5, 2024
a65116f
[ci] try if ssh publish works with ipv4
zachmann Sep 5, 2024
bb89f3b
Bump golang.org/x/term from 0.22.0 to 0.24.0 (#402)
zachmann Sep 17, 2024
700de34
Bump golang.org/x/oauth2 from 0.22.0 to 0.23.0
dependabot[bot] Sep 17, 2024
1525fcb
Bump golang.org/x/crypto from 0.25.0 to 0.27.0
dependabot[bot] Sep 17, 2024
27bbe71
Bump golang.org/x/oauth2 from 0.22.0 to 0.23.0 (#404)
zachmann Sep 17, 2024
f784e7f
Bump golang.org/x/crypto from 0.25.0 to 0.27.0 (#405)
zachmann Sep 17, 2024
f6c1ae8
Bump github.com/go-resty/resty/v2 from 2.14.0 to 2.15.0
dependabot[bot] Sep 17, 2024
4c4c19d
Bump github.com/go-resty/resty/v2 from 2.14.0 to 2.15.0 (#406)
zachmann Sep 17, 2024
663d160
Bump golang.org/x/mod from 0.20.0 to 0.21.0
dependabot[bot] Sep 17, 2024
f2cdb8a
go mod tidy
zachmann Sep 17, 2024
182e968
Bump golang.org/x/mod from 0.20.0 to 0.21.0 (#403)
zachmann Sep 17, 2024
bfd5ce0
Bump github.com/go-resty/resty/v2 from 2.15.0 to 2.15.2
dependabot[bot] Sep 23, 2024
bcbb586
Bump github.com/go-resty/resty/v2 from 2.15.0 to 2.15.2 (#408)
zachmann Sep 23, 2024
beed1a3
fix mytoken recreation code redirect
zachmann Sep 23, 2024
3c38df1
fix profiles applied even after consent
zachmann Sep 23, 2024
e438c12
Merge branch 'prerel' into feat/enforced_restrictions
zachmann Sep 23, 2024
6f7a471
[enforced restrictions] add help html option; allow multiple claim_so…
zachmann Sep 24, 2024
8ba12fc
fix provider config
zachmann Sep 24, 2024
e9830ca
improve profileGetAndParse
zachmann Sep 24, 2024
ceb03ba
Bump github.com/valyala/fasthttp from 1.55.0 to 1.56.0
dependabot[bot] Sep 25, 2024
ccf509e
Bump github.com/valyala/fasthttp from 1.55.0 to 1.56.0 (#409)
zachmann Sep 25, 2024
c451621
Bump github.com/go-resty/resty/v2 from 2.15.2 to 2.15.3
dependabot[bot] Sep 27, 2024
3ce9584
Bump github.com/go-resty/resty/v2 from 2.15.2 to 2.15.3 (#410)
zachmann Sep 27, 2024
12a0486
improve html verify email mail formatting
zachmann Sep 27, 2024
0286a24
fix calendar handling for calendars with spaces in name
zachmann Sep 27, 2024
3fa37fd
fix create-mt urls for both cases when logged in or not
zachmann Sep 27, 2024
5fad458
Bump golang.org/x/term from 0.24.0 to 0.25.0
dependabot[bot] Oct 7, 2024
809cbd5
Bump golang.org/x/crypto from 0.27.0 to 0.28.0
dependabot[bot] Oct 7, 2024
af397cb
Bump github.com/redis/go-redis/v9 from 9.6.1 to 9.7.0
dependabot[bot] Oct 18, 2024
5601b81
improve plaintext notification mails with ascii table
zachmann Oct 24, 2024
5a415b3
remove unnecessary nil check
zachmann Oct 24, 2024
b2c39a5
improve plaintext notification mails with ascii table (#416)
zachmann Oct 24, 2024
9ed1059
Bump github.com/redis/go-redis/v9 from 9.6.1 to 9.7.0 (#415)
zachmann Oct 24, 2024
716027f
Bump golang.org/x/crypto from 0.27.0 to 0.28.0 (#412)
zachmann Oct 24, 2024
a0ce83a
Bump github.com/pires/go-proxyproto from 0.7.0 to 0.8.0
dependabot[bot] Oct 24, 2024
ff795d2
Bump golang.org/x/term from 0.24.0 to 0.25.0 (#411)
zachmann Oct 24, 2024
054319c
Bump github.com/pires/go-proxyproto from 0.7.0 to 0.8.0 (#413)
zachmann Oct 24, 2024
7994994
Bump golang.org/x/term from 0.25.0 to 0.26.0
dependabot[bot] Nov 8, 2024
a71a8dd
Bump github.com/go-resty/resty/v2 from 2.15.3 to 2.16.2
dependabot[bot] Nov 25, 2024
5ae1775
Bump github.com/go-resty/resty/v2 from 2.15.3 to 2.16.2 (#424)
zachmann Nov 26, 2024
dd2b40b
Bump golang.org/x/term from 0.25.0 to 0.26.0 (#421)
zachmann Nov 26, 2024
521183a
Bump golang.org/x/crypto from 0.28.0 to 0.29.0
dependabot[bot] Nov 26, 2024
904f741
Bump golang.org/x/oauth2 from 0.23.0 to 0.24.0
dependabot[bot] Nov 26, 2024
d014369
Bump golang.org/x/oauth2 from 0.23.0 to 0.24.0 (#420)
zachmann Nov 26, 2024
bb02d0b
Bump golang.org/x/crypto from 0.28.0 to 0.29.0 (#418)
zachmann Nov 26, 2024
b066ba5
Bump github.com/valyala/fasthttp from 1.56.0 to 1.57.0
dependabot[bot] Nov 26, 2024
696e622
Bump github.com/valyala/fasthttp from 1.56.0 to 1.57.0 (#417)
zachmann Nov 26, 2024
9081912
Bump golang.org/x/mod from 0.21.0 to 0.22.0
dependabot[bot] Nov 26, 2024
4208c9a
Bump golang.org/x/mod from 0.21.0 to 0.22.0 (#419)
zachmann Nov 26, 2024
591c403
Merge branch 'prerel' into feat/enforced_restrictions
zachmann Nov 26, 2024
4a52051
try new ci approach
zachmann Nov 26, 2024
2dc0669
try new ci approach (#425)
zachmann Nov 26, 2024
acc5905
Ci/update (#426)
zachmann Nov 26, 2024
302250e
Feat/enforced restrictions (#376)
zachmann Nov 26, 2024
08f8527
update changelog
zachmann Nov 26, 2024
c04d8ef
implement healthcheck endpoint
zachmann Nov 29, 2024
5adf811
fix log formatting string
zachmann Nov 29, 2024
ee4fadf
fix code issues
zachmann Dec 2, 2024
6ce24c4
changelog
zachmann Dec 2, 2024
2835bfa
Add healthcheck endpoint (#428)
zachmann Dec 3, 2024
f3827ca
Bump golang.org/x/term from 0.26.0 to 0.27.0
dependabot[bot] Dec 5, 2024
6ada6f0
Bump golang.org/x/crypto from 0.29.0 to 0.30.0
dependabot[bot] Dec 5, 2024
2300c87
Bump golang.org/x/term from 0.26.0 to 0.27.0 (#429)
zachmann Dec 6, 2024
457ee65
Bump golang.org/x/crypto from 0.29.0 to 0.30.0 (#430)
zachmann Dec 6, 2024
cd097eb
changelog
zachmann Dec 6, 2024
7d132da
ignore deepsource
zachmann Dec 6, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
tags
client.config
config/config.yaml
config/notifier-config.yaml
config/docker-config.yaml
IP2LOCATION-LITE-DB1.IPV6.BIN
/cmd/test
generateDDL.sh
dist/
/dist/
/mytoken-migratedb
/docker/docker-compose.yaml
/docker/db.env
Expand Down
12 changes: 11 additions & 1 deletion .gitlab-ci-scripts/goreleaser.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

mkdir ../shared
first=$(grep '^## ' -nm1 CHANGELOG.md | cut -d':' -f1); \
second=$(grep '^## ' -nm2 CHANGELOG.md | tail -n1 | cut -d':' -f1); \
Expand All @@ -6,5 +8,13 @@ GORELEASER_CONFIG=".goreleaser.yml"
if [ -n "$CI_COMMIT_TAG" ] && echo "$CI_COMMIT_TAG" | grep -qv '~'; then
GORELEASER_CONFIG=".goreleaser-release.yml"
fi
goreleaser release -f $GORELEASER_CONFIG --release-notes ../shared/release.md
GORELEASER_OPTIONS=""
[[ "${CI_COMMIT_BRANCH}" != "${CI_DEFAULT_BRANCH}" ]] && {
[[ "${CI_COMMIT_BRANCH}" != "${PREREL_BRANCH_NAME}" ]] && {
# we're on devel
GORELEASER_OPTIONS="--skip docker"
}
}

goreleaser release -f $GORELEASER_CONFIG --release-notes ../shared/release.md --verbose ${GORELEASER_OPTIONS}
ls -l results
12 changes: 10 additions & 2 deletions .gitlab-ci-scripts/set-prerel-version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

DEVSTRING="pr"
VERSION_FILE=internal/model/version/VERSION
Expand Down Expand Up @@ -38,9 +38,17 @@ for R in $REMOTES; do
MASTER_BRANCH="refs/remotes/${R}/${MASTER}"
#echo "Master-branch: ${MASTER_BRANCH}"
[ "x${R}" = "xorigin" ] && break
[ "x${R}" = "xcodebase" ] && break
done

PREREL=$(git rev-list --count HEAD ^"$MASTER_BRANCH")
[[ "${DEVSTRING}" == "dev" ]] && {
[[ -z ${CI_JOB_ID} ]] || {
PREREL=${CI_JOB_ID}
}
}
[[ -z ${PREREL} ]] && {
PREREL=$(git rev-list --count HEAD ^"$MASTER_BRANCH")
}

# use version file:
VERSION=$(cat "$VERSION_FILE")
Expand Down
1 change: 1 addition & 0 deletions .gitlab-ci-scripts/upload.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

REPO_TARGET="/prerel"
if [ -n "$CI_COMMIT_TAG" ] && echo "$CI_COMMIT_TAG" | grep -qv '~'; then
Expand Down
48 changes: 32 additions & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
include:
- 'https://codebase.helmholtz.cloud/m-team/tools/ci-voodoo/-/raw/master/ci-include/github-status-sync.yml'
- "https://codebase.helmholtz.cloud/m-team/tools/ci-voodoo/raw/master/ci-include/pipeline-jobs-publish-to-repo.yml"


variables:
USE_GORELEASER: "true"
UPSTREAM_PROJECT: oidc-mytoken/server

image: golang:1.19
image: golang:1.22
stages:
- build
- test
- lint
- release
- package
- publish
- deploy

default:
Expand Down Expand Up @@ -44,7 +48,7 @@ staticcheck:
vet:
stage: lint
script:
- go vet ./...
- go vet -structtag=false ./...

build_server:
stage: build
Expand All @@ -61,19 +65,17 @@ build_migratedb:
script:
- go build github.com/oidc-mytoken/server/cmd/mytoken-server/mytoken-migratedb

prerelease:
stage: release
package:
stage: package
image:
name: goreleaser/goreleaser
entrypoint: [ "" ]
services:
- docker:dind
only:
refs:
- tags
- prerel
tags:
- linux
# only:
# refs:
# - tags
# - prerel
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
Expand All @@ -83,13 +85,27 @@ prerelease:
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin "$DOCKER_REGISTRY"
script:
- if [ -z "$CI_COMMIT_TAG" ]; then .gitlab-ci-scripts/set-prerel-version.sh; fi;
- .gitlab-ci-scripts/goreleaser.sh
- .gitlab-ci-scripts/upload.sh
- |
[[ "$CI_COMMIT_BRANCH" == "${PREREL_BRANCH_NAME}" ]] && {
echo "Running set-prerel-version"
.gitlab-ci-scripts/set-prerel-version.sh
}
[[ "$CI_COMMIT_BRANCH" != "${PREREL_BRANCH_NAME}" ]] && {
[[ "$CI_COMMIT_BRANCH" != "${CI_DEFAULT_BRANCH}" ]] && {
# we're on a devel branch
echo "Running set-devel-version"
.gitlab-ci-scripts/set-prerel-version.sh --devstring dev
}
}
.gitlab-ci-scripts/goreleaser.sh

artifacts:
paths:
- "results/*"
after_script:
- curl -d "repo=github.com/oidc-mytoken/server" https://goreportcard.com/checks

deploy-dev:
deploy-prerel:
stage: deploy
only:
refs:
Expand All @@ -99,4 +115,4 @@ deploy-dev:
- cp $KNOWN_HOSTS /root/.ssh/known_hosts
- cp $DEPLOYMENT_SSH_KEY /root/.ssh/id_ed25519 && chmod 0600 /root/.ssh/id_ed25519
script:
- ssh mytoken-dev.vm.fedcloud.eu
- ssh -4 mytoken.data.kit.edu
48 changes: 48 additions & 0 deletions .goreleaser-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ builds:
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
- id: notifier-server
main: ./cmd/mytoken-server/mytoken-notifier-server
binary: mytoken-notifier-server
env:
- CGO_ENABLED=0
goos:
- linux
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- name_template: >-
{{ .ProjectName }}_{{ .Version }}_
Expand Down Expand Up @@ -121,6 +131,28 @@ nfpms:
file_name_template: >-
{{ .PackageName }}-{{ .Version }}.
{{- if eq .Arch "386" }}i386{{- else if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
- id: notifier-pkg
package_name: mytoken-notifier-server
file_name_template: >-
{{ .PackageName }}_{{ .Version }}_
{{- if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}
builds:
- notifier-server
homepage: https://mytoken-docs.data.kit.edu/server
maintainer: Gabriel Zachmann <gabriel.zachmann@kit.edu>
description: A standalone notifier server for mytoken notifications
license: MIT
formats:
- deb
- rpm
release: "1"
section: misc
bindir: /usr/bin
overrides:
rpm:
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 Expand Up @@ -170,6 +202,22 @@ dockers:
- "--label=org.opencontainers.image.title=mytoken-migratedb"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- goos: linux
goarch: amd64
ids:
- notifier-server
image_templates:
- "oidcmytoken/mytoken-notifier-server:latest"
- "oidcmytoken/mytoken-notifier-server:{{ .Tag }}"
- "oidcmytoken/mytoken-notifier-server:v{{ .Major }}"
- "oidcmytoken/mytoken-notifier-server:v{{ .Major }}.{{ .Minor }}"
dockerfile: cmd/mytoken-server/mytoken-notifier-server/Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=mytoken-notifier-server"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
50 changes: 50 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ builds:
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
- id: notifier-server
main: ./cmd/mytoken-server/mytoken-notifier-server
binary: mytoken-notifier-server
env:
- CGO_ENABLED=0
goos:
- linux
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- name_template: >-
{{ .ProjectName }}_{{ .Version }}_
Expand Down Expand Up @@ -121,13 +131,36 @@ nfpms:
file_name_template: >-
{{ .PackageName }}-{{ .Version }}.
{{- if eq .Arch "386" }}i386{{- else if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
- id: notifier-pkg
package_name: mytoken-notifier-server
file_name_template: >-
{{ .PackageName }}_{{ .Version }}_
{{- if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}
builds:
- notifier-server
homepage: https://mytoken-docs.data.kit.edu/server
maintainer: Gabriel Zachmann <gabriel.zachmann@kit.edu>
description: A standalone notifier server for mytoken notifications
license: MIT
formats:
- deb
- rpm
release: "1"
section: misc
bindir: /usr/bin
overrides:
rpm:
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
ids:
- server
image_templates:
- "oidcmytoken/mytoken-server:unstable"
- "oidcmytoken/mytoken-server:prerel"
- "oidcmytoken/mytoken-server:{{ .Tag }}"
dockerfile: cmd/mytoken-server/Dockerfile
build_flag_templates:
Expand All @@ -142,6 +175,7 @@ dockers:
- setup
image_templates:
- "oidcmytoken/mytoken-setup:unstable"
- "oidcmytoken/mytoken-setup:prerel"
- "oidcmytoken/mytoken-setup:{{ .Tag }}"
dockerfile: cmd/mytoken-server/mytoken-setup/Dockerfile
build_flag_templates:
Expand All @@ -156,6 +190,7 @@ dockers:
- migratedb
image_templates:
- "oidcmytoken/mytoken-migratedb:unstable"
- "oidcmytoken/mytoken-migratedb:prerel"
- "oidcmytoken/mytoken-migratedb:{{ .Tag }}"
dockerfile: cmd/mytoken-server/mytoken-migratedb/Dockerfile
build_flag_templates:
Expand All @@ -164,6 +199,21 @@ dockers:
- "--label=org.opencontainers.image.title=mytoken-migratedb"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- goos: linux
goarch: amd64
ids:
- notifier-server
image_templates:
- "oidcmytoken/mytoken-notifier-server:unstable"
- "oidcmytoken/mytoken-notifier-server:prerel"
- "oidcmytoken/mytoken-notifier-server:{{ .Tag }}"
dockerfile: cmd/mytoken-server/mytoken-notifier-server/Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=mytoken-notifier-server"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
57 changes: 55 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,59 @@
<!-- ### Dependencies -->
<!-- -->


## mytoken 0.10.0

### Features

- Add support for notifications:
- Allows to create email notifications for various things
- Allows to calendar invites for token expirations
- Allows to create calendars and add token expirations to it; the ics feed can be subscribed to
- Allows to manage notifications on the web-interface
- Add "Enforceable Restrictions"
- Depending on a user attribute different restriction templates can be
enforced
- Add possibility to have an healthcheck endpoint

### Enhancements

- In the tokeninfo pane in the webinterface expired JWTs now get a more precise badge.
- Improved on returning json errors instead of html on api paths
- When not being logged in and no OP was selected now the 'Create new Mytoken' button in the webinterface is disabled.

### Bugfixes

- Fixed an issue with parallel access to refresh tokens if token rotation is used; this problem could for example
occur with EGI-checkin.
- Fixed unwanted behavior: If a profile was used and changes to the mytoken
spec would be made in the consent screen that would narrow it down, the
profile would still be applied.
- Fixed problems with the caching implementation.

### Other

- Changed CORP settings for `/api` and `/static` as this lead to problems with oidc-agent.

### Dependencies

- Bump go version from 1.19 to 1.22
- Bump github.com/coreos/go-oidc/v3 from 3.9.0 to 3.11.0
- Bump github.com/gliderlabs/ssh from 0.3.6 to 0.3.7
- Bump github.com/go-resty/resty/v2 from 2.11.0 to 2.16.2
- Bump github.com/go-sql-driver/mysql from 1.8.0 to 1.8.1
- Bump github.com/gofiber/fiber/v2 from 2.52.2 to 2.52.5
- Bump github.com/gofiber/template/mustache/v2 from 2.0.9 to 2.0.12
- Bump github.com/jmoiron/sqlx from 1.3.5 to 1.4.0
- Bump github.com/lestrrat-go/jwx from 1.2.29 to 1.2.30
- Bump github.com/pires/go-proxyproto from 0.7.0 to 0.8.0
- Bump github.com/redis/go-redis/v9 from 9.5.1 to 9.7.0
- Bump github.com/valyala/fasthttp from 1.52.0 to 1.57.0
- Bump golang.org/x/crypto from 0.21.0 to 0.30.0
- Bump golang.org/x/mod from 0.16.0 to 0.22.0
- Bump golang.org/x/oauth2 from 0.18.0 to 0.24.0
- Bump golang.org/x/term from 0.18.0 to 0.27.0

## mytoken 0.9.2

### Packaging
Expand All @@ -28,12 +81,12 @@
- Bump golang.org/x/mod from 0.15.0 to 0.16.0
- Bump golang.org/x/oauth2 from 0.17.0 to 0.18.0
- Bump golang.org/x/term from 0.17.0 to 0.18.0

-
## mytoken 0.9.1

### Enhancements

- Improfile includes handling in the webitnerface restrictions editor.
- Improve includes handling in the webinterface restrictions editor.

### Dependencies

Expand Down
Loading
Loading