mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-07 07:06:56 +00:00
Corrected IAT and added explicit value for the mock test
This commit is contained in:
parent
2c6158aeef
commit
da8ea015b7
2 changed files with 3 additions and 3 deletions
|
|
@ -44,7 +44,7 @@ function mockGithubOIDCResponse(aud= "https://github.com/hashicorp/vault-action"
|
||||||
ref_type: "branch",
|
ref_type: "branch",
|
||||||
job_workflow_ref: "hashicorp/vault-action/.github/workflows/workflow.yml@refs/heads/main",
|
job_workflow_ref: "hashicorp/vault-action/.github/workflows/workflow.yml@refs/heads/main",
|
||||||
iss: 'vault-action',
|
iss: 'vault-action',
|
||||||
iat: now,
|
iat: now - 60,
|
||||||
nbf: now,
|
nbf: now,
|
||||||
exp: now + 3600,
|
exp: now + 3600,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,8 @@ function generateJwt(privateKey, keyPassword, ttl, iat) {
|
||||||
const now = rsasign.KJUR.jws.IntDate.getNow();
|
const now = rsasign.KJUR.jws.IntDate.getNow();
|
||||||
const payload = {
|
const payload = {
|
||||||
iss: 'vault-action',
|
iss: 'vault-action',
|
||||||
iat: now,
|
iat: now - iat,
|
||||||
nbf: now - iat,
|
nbf: now,
|
||||||
exp: now + ttl,
|
exp: now + ttl,
|
||||||
event: process.env.GITHUB_EVENT_NAME,
|
event: process.env.GITHUB_EVENT_NAME,
|
||||||
workflow: process.env.GITHUB_WORKFLOW,
|
workflow: process.env.GITHUB_WORKFLOW,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue