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

(RK-243) Refuse to generate rugged credentials more than 50 times. #596

Merged
merged 1 commit into from
May 17, 2016

Conversation

scotje
Copy link
Contributor

@scotje scotje commented May 16, 2016

In libgit2/rugged 0.24.0 the callback for fixed credentials continues to be called until either it raises an error or the server gives up. Since neither was happening, invalid credentials were leading to an
infinite retry loop.

@scotje
Copy link
Contributor Author

scotje commented May 16, 2016

It's unclear to me if there are situations where the credentials callback instance's #call would be legitimately called more than once in normal r10k operations.

The new behavior as of libgit2/rugged 0.24.0 is to continue to call the
credentials callback until either it raises an error or the server gives
up. Since neither was happening for HTTP sources, invalid credentials were
leading to an infinite retry loop. SSH sources already seemed to have a
client side abort at around 50 attempts.
@scotje scotje changed the title (RK-243) Refuse to generate rugged credentials more than once. (RK-243) Refuse to generate rugged credentials more than 50 times. May 16, 2016
@scotje
Copy link
Contributor Author

scotje commented May 16, 2016

Bumped the limit up to 50 to be roughly consistent with how many times SSH auth will retry.

@scotje
Copy link
Contributor Author

scotje commented May 16, 2016

See libgit2/rugged#592

@andersonmills
Copy link
Contributor

👍 I'm happy with this. Tested by hand and watched the infinite loop and the 50 count.

@scotje scotje merged commit 308ea0a into puppetlabs:master May 17, 2016
@scotje scotje deleted the 243_authentication_loop branch May 17, 2016 22:03
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