From 94f286b3ab4da2d73f9cbdf3849aebb72c0476ea Mon Sep 17 00:00:00 2001 From: IanB Date: Wed, 13 Mar 2019 11:15:31 +0000 Subject: Enhance RProxy authorization to use request method Authorization filter now takes into account the request method. The desired method can now be added to the authorization file defaulting to GET if not supplied. The request URI & method can now be checked against the authorization configuration along with the needed permissions. Issue-ID: AAF-786 Change-Id: I25f6f2180ac9d94a30ca5ba1aa349fb424c18d81 Signed-off-by: IanB --- sidecar/rproxy/config/auth/uri-authorization.json | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sidecar/rproxy/config/auth') diff --git a/sidecar/rproxy/config/auth/uri-authorization.json b/sidecar/rproxy/config/auth/uri-authorization.json index 61ea9e6..208db1a 100644 --- a/sidecar/rproxy/config/auth/uri-authorization.json +++ b/sidecar/rproxy/config/auth/uri-authorization.json @@ -7,6 +7,14 @@ }, { "uri": "\/single\/permission\/required$", + "method": "GET", + "permissions": [ + "test.single.access\\|single\\|permission" + ] + }, + { + "uri": "\/single\/permission\/required$", + "method": "PUT|POST", "permissions": [ "test.single.access\\|single\\|permission" ] @@ -92,6 +100,7 @@ }, { "uri": "\/aai\/v13\/cloud-infrastructure\/cloud-regions\/cloud-region\/[^\/]+[\/][^\/]+$*", + "method": "GET", "permissions": [ "test.auth.access\\|clouds\\|read", "test.auth.access\\|tenants\\|read" -- cgit 1.2.3-korg