-
Notifications
You must be signed in to change notification settings - Fork 15
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
Integrate latest SFA code #854
Comments
Last relevant fix appears to be here: and this: Also, more compact printouts for pretty_cred and pretty_cert (was get_printable_subject or get_summary_tostring) Also renamed Certificate.cert as Certificate.x509 Some reformatting, some debug printouts when using xmlsec They are at sfa 3.1-18 |
The overall changes include a fair bit
credential.py:
I'm merging in their fixes without losing the bits I like. But the extent of the changes means this needs to be tested on Windows&Mac, on the clearinghouse, etc. |
Changes to look for when updating
These changes impact among other things:
|
…1-9 of May 2014). This update includes: * drop legacy credential support * invoke xmlxec using subprocess and use the return code to measure success * rename methods for printing pretty certs and creds * rename the inner cert in the Certificate This merge is not a complete replace of what we had with the latest from SFA, as the latest from SFA does not have ABAC credential support, support multiple certs in the credential signature, support utf-8 credentials, or include many of our error checks.
Tested and verified:
|
I've now also used speaksfor to talk to a CH running the new gcf, and to talk to a gcf am. I have not tested the numerous error conditions. |
I supplied diffs to Thierry. He is integrating my changes back in to SFA. |
Hello, Fed4FIRE has put a new automated test for access to aggregate managers through speaks_for that fails for our BonFIRE delegate based on geni-tools. It fails when using the master and the develop branch, as well as when using the branch it cut when testing this issue last December (https://github.com/dmargery/geni-tools/tree/tkt854-newsfa) Looking at the code, and certs, I see that xml:id used in the speaks_for cert is _0, as in but in src/gcf/sfa/trust/credential.py, Signature.decode has Even if this bug is solved (using string. replace), the code of gcf/geni/util/speaksfor_util.py's verify_speaks_for function seems very suspect : It is accessing cred.signature and cred.signature.gid whithout using the dedicated accessors. This goes beyond my debugging abilities but I end up with the following error:
I report in this issue because I suspect speaksfor_util to be missing an update after sfa code update. An ideas ? David Margery |
The following commit shows how I went one step further in my debugging: |
Some extra information: The speaksfor credential used when this problem occurs, is generated by jFed. I have tested jFed speaksfor credentials, and they work on emulab (wall2 with wall2 accounts), and on the geni portal SA/MA (with geni portal accounts). Are there any other AM's where speaksfor should work? Because it might be interesting to test these with jFed too. Similarly, It could be interesting to test the BonFIRE AM using omni and a speaksfor credential that is not generated by jFed. |
@wvdemeer ExoGENI AMs also handle speaks for credentials so please try there. You can see a list of possibilities at https://portal.geni.net/amstatus.php (search for "Exo"). The GENI clearinghouse SA/MA ought to be using speaks for code from geni-tools (gcf). @dmargery could you try the speaks for parsing from the 2.10 release (without the SFA integration)? Does it work there? Does the relevant parsing code ( Thanks! |
@tcmitchell : the offending code using strip to remove the leading Sig_ has been in the code for the last 2 years : https://github.com/GENI-NSF/geni-tools/blob/master/src/gcf/sfa/trust/credential.py#L192 Maybe jFed is the only client generating signatures and credentials with an xml:id starting with an underscore, explaining why that part of the issue has gone undetected until now. Not running my own CH or SA, I only have one identity. Therefore, generating a speaks_for from an authority that will be seen as valid by my running AM endpoints is not trivial (to check with a speaks_for with no leading _ in xml:id on geni-tools v2.10). So it will be a bit time consuming for me to check if the new sfa code is at fault. I don't believe I can dedicate enough time for that test until February 10, unless you see a shortcut. |
David,
First: There are multiple places in Next: You should be able to replicate and test your solution as so:
As for your concerns that Looking at the error message you got: I suspect it can be traced to needing to do more edits on the use of
But I'd like to see if removing the use of Thanks for finding the issue(s) and reporting what you've found so far. If you manage to do the tests / edits described above, I'm hopeful that will resolve things. Then we'll likely want to open separate issues to track each. I think they will need to be fixed independent of updating to the latest SFA. |
My take is that the def remove_prefix(text, prefix):
if text.startswith(prefix):
return text[len(prefix):]
return text #or whatever And then replace |
@tcmitchell I've tried exogeni as you suggested. I've tested GPO exogeni, and speaks4 works correctly there. I've also added test for cloudlab utah and utah apt, and they also succeed. But I did find a jFed bug that is relevant! In some of our automated tests, a user credential is sent to the AM instead of a slice credential (so the speaskfor credential is ok, but the other credential isn't). In that case, the AM correctly denies the user access. I'll fix that bug ASAP. |
Update: The debugging-bug I mentioned has been fixed (it was actually a bug on wall2, not in jFed). So no more occasional false failures during debugging now. |
I have verified that there is a bug in SFA credential parsing, and also verified that the fix @dmargery started and @tcmitchell suggested a full fix for is sufficient in my testing. Please take a look at issue #890. Also take a look at my branch with my proposed fix at https://github.com/ahelsing/geni-tools/tree/tkt890-refid If that works for you, we can merge that in and also add it to the SFA integration branch. |
The fix for the issues @dmargery identified and noted on issue #890 are merged on to develop, as well as on to my branch https://github.com/ahelsing/geni-tools/tree/tkt854-newsfa |
The SFA code has been updated: http://git.planet-lab.org/?p=sfa.git;a=summary
Changes include:
Consider merging in their changes and contributing ours.
The text was updated successfully, but these errors were encountered: