Skip to content

Commit

Permalink
fix: token secret fresh (#13)
Browse files Browse the repository at this point in the history
* fix: token secret fresh

* fix: update github action timeout
wuxs authored Jun 8, 2023
1 parent 1b010f3 commit 175a7f6
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ env:
jobs:
lint:
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 120
name: Verify vendor, licenses, do lint
env:
GOPATH: /home/runner/work/${{ github.repository }}
@@ -59,7 +59,7 @@ jobs:

image-prepare:
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 120
name: Prepare kubeedge/build-tools image
steps:
- name: Pull kubeedge/build-tools image
@@ -76,7 +76,7 @@ jobs:

build:
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 120
name: Multiple build
needs: image-prepare
steps:
@@ -112,7 +112,7 @@ jobs:

basic_test:
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 120
name: Unit test, integration test edge
env:
GO111MODULE: on
@@ -163,7 +163,7 @@ jobs:
PROTOCOL:
- WebSocket
- QUIC
timeout-minutes: 30
timeout-minutes: 120
name: E2e test
needs: image-prepare
env:
@@ -222,7 +222,7 @@ jobs:
keadm_deprecated_e2e_test:
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 120
name: Keadm deprecated e2e test
needs: image-prepare
env:
@@ -263,7 +263,7 @@ jobs:

keadm_e2e_test:
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 120
name: Keadm e2e test
env:
GO111MODULE: on
@@ -298,7 +298,7 @@ jobs:

docker_build:
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 120
name: Multiple docker image build
steps:
- uses: actions/cache@v3
2 changes: 2 additions & 0 deletions cloud/pkg/cloudhub/servers/httpserver/signcerts.go
Original file line number Diff line number Diff line change
@@ -114,6 +114,8 @@ func refreshToken() string {
expirationTime := time.Now().Add(time.Hour * hubconfig.Config.CloudHub.TokenRefreshDuration * 2)
claims.ExpiresAt = expirationTime.Unix()
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
token.Header[ClusterName] = os.Getenv("EDGE_CLUSTER_NAME")
token.Header[ClusterType] = "EdgeCluster"
keyPEM := getCaKey()
tokenString, err := token.SignedString(keyPEM)
if err != nil {

0 comments on commit 175a7f6

Please sign in to comment.