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
Show file tree
Hide file tree
Changes from 16 commits
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ alias:
default: &default
working_directory: /go/src/github.com/yahoojapan/athenz-client-sidecar
docker:
- image: circleci/golang:1.12
- image: circleci/golang:1.13
environment:
GOPATH: "/go"
GO111MODULE: "on"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.12-alpine AS base
FROM golang:1.13-alpine AS base

RUN set -eux \
&& apk --no-cache add ca-certificates \
Expand Down
9 changes: 9 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ type Role struct {

// TokenExpiry represent the duration of the expiration
TokenExpiry string `yaml:"expiration"`

// RefreshInterval represent the role token refresh duration.
RefreshInterval string `yaml:"refresh_interval"`

// ErrRetryMaxCount represent the maximum error retry count during refreshing the role token cache.
ErrRetryMaxCount int `yaml:"err_retry_max_count"`

// ErrRetryInterval represent the error retry interval when refreshing the role token cache.
ErrRetryInterval string `yaml:"err_retry_interval"`
}

const (
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
module github.com/yahoojapan/athenz-client-sidecar

go 1.12
go 1.13

require (
bou.ke/monkey v1.0.1 // indirect
github.com/kpango/fastime v1.0.15
github.com/kpango/gache v1.1.21
github.com/kpango/gache v1.1.22
github.com/kpango/glg v1.4.6
github.com/kpango/ntokend v1.0.7
github.com/pkg/errors v0.8.1
golang.org/x/sync v0.0.0-20190423024810-112230192c58
gopkg.in/yaml.v2 v2.2.2
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
gopkg.in/yaml.v2 v2.2.4
)
182 changes: 174 additions & 8 deletions go.sum

Large diffs are not rendered by default.

Loading