ranger-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stromas, Aaron" <aaron.stro...@rsa.com>
Subject Re: Cannot create policy, getting 404
Date Wed, 20 Jul 2016 13:26:41 GMT
Hi Lune,

Thank you for the suggestion Unfortunately, it  helped only partially. Not for updating policy
by service-name and policy-name?  I changed

curl -iv -u admin:admin  -H "Content-Type: application/json" -d @hdfs-update-policy-by-name.payload
-X PUT http://192.168.26.111:6080/service/public/v2/api/Sandbox_hdfs/policy/appaccess

to

curl -iv -u admin:admin  -H "Content-Type: application/json" -d @hdfs-update-policy-by-name.payload
-X PUT http://192.168.26.111:6080/service/public/v2/api/service/Sandbox_hdfs/policy/appaccess

and still got 404, but for the search policies in the service

curl -iv -u admin:admin -X GET http://192.168.26.111:6080/service/public/v2/api/service/Sandbox_hdfs/policy

it did indeed work. Thank you!

And delete policy by service-name and policy name resulted in HTTP 405;

 # curl -iv -u admin:admin -X DELETE http://192.168.26.111:6080/service/public/v2/api/service/Sandbox_hdfs/policy/appaccess
* About to connect() to 192.168.26.111 port 6080 (#0)
*   Trying 192.168.26.111... connected
* Connected to 192.168.26.111 (192.168.26.111) port 6080 (#0)
* Server auth using Basic with user 'admin'
> DELETE /service/public/v2/api/service/Sandbox_hdfs/policy/appaccess HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.19.7 (x86_64-suse-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8j zlib/1.2.7
libidn/1.10
> Host: 192.168.26.111:6080
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
HTTP/1.1 405 Method Not Allowed
< Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=8297424BB67112866AC76700FC6AA502; Path=/; HttpOnly
Set-Cookie: JSESSIONID=8297424BB67112866AC76700FC6AA502; Path=/; HttpOnly
< X-Frame-Options: DENY
X-Frame-Options: DENY
< Allow: GET,OPTIONS,HEAD,PUT
Allow: GET,OPTIONS,HEAD,PUT
< Content-Type: text/html;charset=utf-8
Content-Type: text/html;charset=utf-8
< Content-Language: en
Content-Language: en
< Content-Length: 1013
Content-Length: 1013
< Date: Wed, 20 Jul 2016 13:17:25 GMT
Date: Wed, 20 Jul 2016 13:17:25 GMT

<
* Connection #0 to host 192.168.26.111 left intact
* Closing connection #0
<html><head><title>Apache Tomcat/7.0.55 - Error report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color
: black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP
Status 405 - Method Not Allowed</h1><HR size="1" noshade="noshade"><p><b>type</b>
Status report</p><p><b>message</b> <u>Method Not Allowed</u></p><p><b>description</b>
<u>The specified HTTP method is not allowed for the reque


Best regards,

-Aaron

—
Aaron Stromas  |  RSA  The Security Division of EMC | Practice Consultant  |  Identity &
Fraud Protection Practice |  M +1 240 271 64 58 |

From: Lune Silver <lunescar.ranger@gmail.com<mailto:lunescar.ranger@gmail.com>>
Reply-To: "user@ranger.incubator.apache.org<mailto:user@ranger.incubator.apache.org>"
<user@ranger.incubator.apache.org<mailto:user@ranger.incubator.apache.org>>
Date: Wednesday, July 20, 2016 at 5:37 AM
To: "user@ranger.incubator.apache.org<mailto:user@ranger.incubator.apache.org>" <user@ranger.incubator.apache.org<mailto:user@ranger.incubator.apache.org>>
Subject: Re: Cannot create policy, getting 404


You can use json valider website to validate the json policy you submit. It helped me a lot
in the beginning.

BR.

Lune

Le 19 juil. 2016 20:09, "Stromas, Aaron" <aaron.stromas@rsa.com<mailto:aaron.stromas@rsa.com>>
a écrit :
I  should have checked the logs before posting – I had an error in content.

Best regards,

-Aaron

—
Aaron Stromas  |  RSA  The Security Division of EMC | Practice Consultant  |  Identity &
Fraud Protection Practice |  M +1 240 271 64 58 |

From: Corporate User <aaron.stromas@rsa.com<mailto:aaron.stromas@rsa.com>>
Reply-To: "user@ranger.incubator.apache.org<mailto:user@ranger.incubator.apache.org>"
<user@ranger.incubator.apache.org<mailto:user@ranger.incubator.apache.org>>
Date: Tuesday, July 19, 2016 at 2:06 PM
To: "user@ranger.incubator.apache.org<mailto:user@ranger.incubator.apache.org>" <user@ranger.incubator.apache.org<mailto:user@ranger.incubator.apache.org>>
Subject: Cannot create policy, getting 404

Greetings,

I am familiarizing myself with Apache Ranger, as I am starting an project that will use Ranger
REST API, so I’m trying various API calls, and I am having a problem with the create policy
request. Any suggestions what I am doing wrong? TIA.
I’m using Ranger version 0.5.0.2.4.0.0-169

curl -iv -u <admin-user>>:<admin-password>  -H "Content-Type: application/json"
-d @hdfs-create-policy.payload -X POST http://<ranger-host>:6080/service/public/v2/api/policy
* About to connect() to 192.168.26.111 port 6080 (#0)
*   Trying 192.168.26.111... connected
* Connected to 192.168.26.111 (192.168.26.111) port 6080 (#0)
* Server auth using Basic with user 'admin'
> POST /service/public/api/policy HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.19.7 (x86_64-suse-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8j zlib/1.2.7
libidn/1.10
> Host: 192.168.26.111:6080<http://192.168.26.111:6080>
> Accept: */*
> Content-Type: application/json
> Content-Length: 677
>
< HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
< Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=41171E333DB1E48A0AD0CBFC088DB033; Path=/; HttpOnly
Set-Cookie: JSESSIONID=41171E333DB1E48A0AD0CBFC088DB033; Path=/; HttpOnly
< X-Frame-Options: DENY
X-Frame-Options: DENY
< Content-Length: 0
Content-Length: 0
< Date: Tue, 19 Jul 2016 15:01:30 GMT
Date: Tue, 19 Jul 2016 15:01:30 GMT

Best regards,

-Aaron

—
Aaron Stromas  |  RSA  The Security Division of EMC | Practice Consultant  |  Identity &
Fraud Protection Practice |  M +1 240 271 64 58 |

Mime
View raw message