Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

[patch] Add refresh interval #15

Merged
merged 52 commits into from
Oct 23, 2019
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
5e669ec
add refresh functionality
kevindiu Oct 4, 2019
b2ab80d
update dependencies version
kevindiu Oct 4, 2019
c4e3466
update golang version to 1.13
kevindiu Oct 4, 2019
98436de
fix failed test case
kevindiu Oct 4, 2019
717adb9
update go.mod
kevindiu Oct 4, 2019
8e571bd
include proxyForPrincipal field to the object key
Oct 7, 2019
8a953b7
add test case and fix encode and decode funcion
Oct 7, 2019
9c33268
fix test case order and add TODO test case stub
kevindiu Oct 8, 2019
8b12582
add test case
kevindiu Oct 8, 2019
841c41e
[patch] update golang version (#16)
kevindiu Oct 10, 2019
903c459
fix
kevindiu Oct 11, 2019
78a339f
Add test
No1zy Oct 11, 2019
1d4cca2
add test case
kevindiu Oct 11, 2019
e59dca1
add test case
kevindiu Oct 16, 2019
d4c9b03
add test case and fix logic
kevindiu Oct 17, 2019
43e8eac
add test case
kevindiu Oct 17, 2019
8a79c03
fix test case and change default token expiry time and fix
kevindiu Oct 18, 2019
818ddb1
comment failed test case due to different env.
kevindiu Oct 18, 2019
4b4afd3
fix gocibot
kevindiu Oct 18, 2019
b32d723
add test case and minor fix
kevindiu Oct 18, 2019
e42581d
fix (#19)
WindzCUHK Oct 18, 2019
60f0b73
small refactor
kevindiu Oct 18, 2019
34a2a42
add refresh functionality
kevindiu Oct 4, 2019
cf78edd
fix failed test case
kevindiu Oct 4, 2019
bc80488
include proxyForPrincipal field to the object key
Oct 7, 2019
05ebcdf
add test case and fix encode and decode funcion
Oct 7, 2019
be823ae
fix test case order and add TODO test case stub
kevindiu Oct 8, 2019
e7914cf
add test case
kevindiu Oct 8, 2019
c8655ff
fix
kevindiu Oct 11, 2019
c3b7aef
Add test
No1zy Oct 11, 2019
6cd8eb9
add test case
kevindiu Oct 11, 2019
348c87a
add test case
kevindiu Oct 16, 2019
72ff5c9
add test case and fix logic
kevindiu Oct 17, 2019
8f33fb1
add test case
kevindiu Oct 17, 2019
cfaf882
fix test case and change default token expiry time and fix
kevindiu Oct 18, 2019
59e8491
comment failed test case due to different env.
kevindiu Oct 18, 2019
4ace229
fix gocibot
kevindiu Oct 18, 2019
5abcf59
add test case and minor fix
kevindiu Oct 18, 2019
070da5e
small refactor
kevindiu Oct 18, 2019
35c23d1
Merge branch 'add_refresh_interval' of https://github.com/yahoojapan/…
kevindiu Oct 18, 2019
129a3f8
set max expiry only if user specify it
kevindiu Oct 18, 2019
a795564
fix comments
kevindiu Oct 21, 2019
b423fa6
Update service/role.go
kevindiu Oct 21, 2019
7d4cd34
fix
kevindiu Oct 21, 2019
a516f1d
fix
kevindiu Oct 21, 2019
102988d
roles ordering
kevindiu Oct 21, 2019
3b9463f
fix retry count and minor changes
kevindiu Oct 21, 2019
59250f5
do not trim on roles and make the refreshRoleToken channel is buffer
kevindiu Oct 21, 2019
748830d
do not use buffer channel on StartRoleUpdaterm and chang the expiryHo…
kevindiu Oct 21, 2019
0b62730
fix typo
kevindiu Oct 21, 2019
d2f9d73
add test case and revert change of the buffered channel
kevindiu Oct 23, 2019
ade5e8d
[patch] release
kevindiu Oct 23, 2019
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 service/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ func (r *roleService) RefreshRoleTokenCache(ctx context.Context) <-chan error {

r.domainRoleCache.Foreach(ctx, func(key string, val interface{}, exp int64) bool {
domain, role, principal := decode(key)
for err := range r.updateRoleTokenWithRetry(ctx, domain, role, principal, r.expiry, r.expiry) {

for err := range r.updateRoleTokenWithRetry(ctx, domain, role, principal, val.(cacheData).minExpiry, val.(cacheData).minExpiry) {
WindzCUHK marked this conversation as resolved.
Show resolved Hide resolved
echan <- err
kevindiu marked this conversation as resolved.
Show resolved Hide resolved
}
return true
Expand Down