Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't call LeaseExtend on login renewal paths when period is provided #3803

Merged
merged 15 commits into from
Jan 18, 2018

Conversation

calvn
Copy link
Member

@calvn calvn commented Jan 16, 2018

No description provided.

@calvn calvn requested a review from jefferai January 16, 2018 17:20
@calvn calvn added this to the 0.9.2 milestone Jan 16, 2018
if err != nil {
return nil, err
// If a period is provided, set that as part of resp.Auth.Period and return a
// response immediately. Let expiration manager handle renewal from thereon.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/thereon/there on

jefferai
jefferai previously approved these changes Jan 16, 2018
Copy link
Member

@jefferai jefferai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but please add tests

TTL: 5 * time.Second,
Renewable: true,
},
// Period: 5 * time.Second,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused what this test is supposed to be doing -- it has period in the name but this is commented out.


// Wait 3 seconds
// time.Sleep(3 * time.Second)
out, err := exp.RenewToken(&logical.Request{}, "auth/foo/login", root.ID, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this supposed to be doing?

fmt.Println(out.Auth)

// time.Sleep(3 * time.Second)
out, err = exp.RenewToken(&logical.Request{}, "auth/foo/login", root.ID, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. There's no sleep, I'm not sure what having this twice in a row is supposed to be doing.

t.Fatalf("err: %v", err)
}

fmt.Println(out.Auth)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we don't print out values on success

@jefferai jefferai modified the milestones: 0.9.2, 0.9.3 Jan 17, 2018
@calvn calvn merged commit 2069614 into master Jan 18, 2018
@calvn calvn deleted the auth-login-renewal-period branch January 18, 2018 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants