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

support rest-proxy URI #111

Closed
chen23 opened this issue Jul 13, 2016 · 0 comments
Closed

support rest-proxy URI #111

chen23 opened this issue Jul 13, 2016 · 0 comments

Comments

@chen23
Copy link

chen23 commented Jul 13, 2016

iWorkflow / BIG-IQ (?) support REST proxy URI. This makes it possible to apply tenant RBAC on the REST endpoints (i.e. limit a user to only be able to modify a single BIG-IP LTM pool in a single Partition).

Documented here: https://devcentral.f5.com/wiki/iControl.REST_proxy_APIs.ashx

Example of one of the changes required (this is not meant to be a "good" example, but it gets the job done). This was done to monkey patch the library:

def _validate_icruri(base_uri):
    # The icr_uri should specify https, the server name/address, and the path
    # to the REST-or-tm management interface "/mgmt/tm/"
    scheme, netloc, path, _, _ = urlsplit(base_uri)
    if scheme != 'https':
        raise InvalidScheme(scheme)
    if path.startswith('/mgmt/shared/'):
        return icontrol.session._validate_prefix_collections(path[9:])
    if not path.startswith('/mgmt/tm/'):
        error_message = "The path must start with '/mgmt/tm/'!!  But it's:" +\
            " '%s'" % path[:10]
        raise InvalidBigIP_ICRURI(error_message)
    return icontrol.session._validate_prefix_collections(path[9:])
icontrol.session._validate_icruri = _validate_icruri

caphrim007 added a commit to caphrim007/f5-icontrol-rest-python that referenced this issue Dec 22, 2016
Issues:
Fixes F5Networks#111

Problem:
The ICR URI validation did not take into account iworkflow and BIG-IQ
top-level URI paths.

Analysis:
This patch adds top-level validation for more iworkflow and big-iq
apis

Tests:
unit
caphrim007 added a commit to caphrim007/f5-icontrol-rest-python that referenced this issue Dec 22, 2016
Issues:
Fixes F5Networks#111

Problem:
The ICR URI validation did not take into account iworkflow and BIG-IQ
top-level URI paths.

Analysis:
This patch adds top-level validation for more iworkflow and big-iq
apis

Tests:
unit
caphrim007 added a commit to caphrim007/f5-icontrol-rest-python that referenced this issue Dec 22, 2016
Issues:
Fixes F5Networks#111

Problem:
The ICR URI validation did not take into account iworkflow and BIG-IQ
top-level URI paths.

Analysis:
This patch adds top-level validation for more iworkflow and big-iq
apis

Tests:
unit
caphrim007 added a commit to caphrim007/f5-icontrol-rest-python that referenced this issue Dec 22, 2016
Issues:
Fixes F5Networks#111

Problem:
The ICR URI validation did not take into account iworkflow and BIG-IQ
top-level URI paths.

Analysis:
This patch adds top-level validation for more iworkflow and big-iq
apis

Tests:
unit
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

No branches or pull requests

1 participant