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

Add support for KRL #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add support for KRL #10

wants to merge 2 commits into from

Conversation

pinodeca
Copy link

@pinodeca pinodeca commented Mar 1, 2018

Hi folks, this is just preliminary to get your thoughts.

Tests and some cleanup are needed. I only did some manual testing on my integration with Tatu (github.com/openstack/tatu).

@CLAassistant
Copy link

CLAassistant commented Mar 1, 2018

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pmoody-
Copy link
Contributor

pmoody- commented Mar 1, 2018

Thanks for the pr, Pino!

can you look at/sign the CLA?

@pinodeca
Copy link
Author

pinodeca commented Mar 1, 2018 via email

@pinodeca
Copy link
Author

pinodeca commented Mar 2, 2018

I checked the CLA and I'm not able to edit or re-sign it- but it has all my information.

@pmoody-
Copy link
Contributor

pmoody- commented Mar 6, 2018

the cla checker says you still haven't signed our cla.

what do you see when you go to https://cla-assistant.io/uber/pam-ussh ?

@pmoody-
Copy link
Contributor

pmoody- commented Mar 8, 2018

@pinodeca any luck re-signing the CLA? I can try to talk to our github admins if it's not letting you sign for some reason.

@pinodeca
Copy link
Author

pinodeca commented Mar 8, 2018

Terribly sorry for dropping this thread.

When I'm signed into GitHub and go to https://cla-assistant.io/uber/pam-ussh I see:
"You have signed the CLA for uber/pam-ussh"

That is followed by the license text, my personal information and the checked checkbox "By checking this box, I am electronically signing..."

None of it is editable.

Signed-off-by: Pino de Candia <giuseppe.decandia@gmail.com>
@pmoody-
Copy link
Contributor

pmoody- commented Mar 8, 2018

can you send me a screenshot of what you see when you go to the cla page?

@pinodeca
Copy link
Author

pinodeca commented Mar 8, 2018

Sure - here they are.

cla_screen_top
cla_screen_bottom

@dmyerscough
Copy link

@pmoody- @gdecandia the signing isn't working here, due to the email mismatch.

The diff uses the email "giuseppe.decandia@gmail.com" vs "giuseppedecanida@gmail.com"

Copy link
Contributor

@pmoody- pmoody- left a comment

Choose a reason for hiding this comment

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

can you add a test for this? if it's easier, you can pull the whole krlFile parsing into its own function and just test that.

return authenticate2(w, uid, username, ca, principals, "")
}

func authenticate2(w io.Writer, uid int, username, ca string, principals map[string]struct{}, krlFile string) AuthResult {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you just call this authenticate?

@@ -118,6 +124,22 @@ func authenticate(w io.Writer, uid int, username, ca string, principals map[stri
return AuthError
}

var parsedKRL *krl.KRL
parsedKRL = nil
if len(krlFile) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, if krlFile != "" {

@@ -118,6 +124,22 @@ func authenticate(w io.Writer, uid int, username, ca string, principals map[stri
return AuthError
}

var parsedKRL *krl.KRL
parsedKRL = nil
Copy link
Contributor

Choose a reason for hiding this comment

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

this isn't needed, it should be nil by default.

return authenticate2(w, uid, username, ca, principals, "")
}

func authenticate2(w io.Writer, uid int, username, ca string, principals map[string]struct{}, krlFile string) AuthResult {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you just call this authenticate?

@@ -118,6 +124,22 @@ func authenticate(w io.Writer, uid int, username, ca string, principals map[stri
return AuthError
}

var parsedKRL *krl.KRL
parsedKRL = nil
if len(krlFile) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, if krlFile != "" {

@pmoody-
Copy link
Contributor

pmoody- commented Nov 21, 2018

sorry, i'm an idiot and it's taken me way too long to get to this.

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.

5 participants