-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support download using Kerberos authentication #93
Conversation
Required steps to use this:
TODO: verify TLS is enabled, have this reviewed by someone who has experience with apache configs |
I can see how that looks like good Perl but leads to bad security policy. I suppose you could always constrain that $self->{TRUST} is always set in config but I am not sure that is the case. The lack of anchoring of the regex is also bad. I mostly agree with your formulation but not sure why you still need to check that @trusts is true given the previous line? I think the following should be sufficient?
|
@ned21 indeed, the if (grep {$author =~ $_} @{$self->{TRUST} || [] }}) {
$cnt = $payload;
} else {
die("Refusing profile generated by $author");
} do you want to tighten the regex also? i'm not sure how creative one can be in principals, but if you configure your trust as |
I think we should tighten the regex to match the exact principal only. |
@ned21 in this PR? i can make it grep {$author =~ $_} map {"^$_\$"} @{$self->{TRUST} || [] }} works fine like
|
Why use a regex instead of the eq operator?
|
@ned21 ofcourse. what do you currently use as trust? full principal incl the realm? i don't know what the |
We use the full principal name including realm in our trust config. |
@ned21 ok, i'll use the |
@ned21 looks like TRUST by default is empty arrayref. do you still want the |
error() and return sounds less destructive than die()-ing? Very little else in CAF calls die() so I'm reluctant to start making things die() everywhere unless we are consistent about it. |
@ned21 to be clear: the |
By "current" code do you mean what's used in ccm-fetch? In which case I would be inclined to keep it: error()/return makes sense in components where you want it to run to the end and report all errors. die() makes sense in ccm-fetch where you need to abort. |
@ned21 ok, i'll keep it. we can do the reevaluation of die another time. |
@ned21 modified, with tests |
Thanks. One last request: can you please add a unit test where trust includes [email protected] (i.e. all lower case and no /service). That's what we actually specify in our configs and we were already bitten by some technically correct by over-zealous validation of the principal that required the realm to be upper case! |
@ned21 where did you run into this? |
It was when validation of the principal name was added to ncm-ccm's schema I think. |
@ned21 so you want a test for all lowewrcase trust in ccm.conf in this repo and similar example in ncm-ccm? |
@ned21 test added |
Thanks! What do we need to do to get the tests passing again? |
if you're lucky, merge the 2 PRs in the description 😄 i'm adding the ncm-ccm unittest in quattor/configuration-modules-core#709 (as i managed to push the corresponding krb5 commit in that branch) |
@ned21 quattor/configuration-modules-core@35b3abd, component already covered it |
retest this please |
@ned21 tests pass now |
Rebase please? |
I've disabled the not up to date warnings from GitHub, it shouldn't complain unless there is actually a conflict now, it's unreasonable to expect all PRs to be rebased just because another has been merged. |
Can be merged if @ned21 is happy! |
Fixes #54
Requires quattor/CAF#145
Based on #88