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

Reconcile 2 cred type parsers #819

Open
ahelsing opened this issue May 19, 2015 · 2 comments
Open

Reconcile 2 cred type parsers #819

ahelsing opened this issue May 19, 2015 · 2 comments

Comments

@ahelsing
Copy link
Member

There are 2 methods that try to parse the credential type:
src/gcf/sfa/trust/credential_factory.py defines getType

src/gcf/omnilib/util/credparsing defines get_cred_type.

Both methods are used in multiple places.

Try to have only 1 set of logic.

Imported from trac ticket #819, created by ahelsing on 05-18-2015 at 09:22, last modified: 05-18-2015 at 09:22

@ahelsing
Copy link
Member Author

ahelsing commented Jun 2, 2015

The sfa version detects abac of privilege (=sfa) types, else returns the type as the value of the type slot. The Omni version returns unknown_type instead of whatever was in the type slot.

The Omni version tries to see if this is SFA v2 or SFA v3, though it does a poor job of it. But am3.py and others that use that rely on getting a version # back.

The Omni version fully parses the XML doc to mostly search for some strings - expensive.

@ahelsing
Copy link
Member Author

ahelsing commented Jun 2, 2015

All uses of the sfa version currently look for the type returned to be one of the 2 constants or raise an error. (sfa.trust.credential_factory, abac_authorizer, and util/cred_util, util/speaksfor_util)

omni version is used in framework_base and am/am3.py

framework_base simply uses the returned values as is to fill in the JSON struct for the cred. am3.py does the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant