Ranger S3 Plugin enables creation of policies in Apache Ranger for S3 buckets hosted on Ceph/RadosGW (S3 coming later).
It merely allows for the creation of policies and does not set ACLs by itself. It can be used together with its sister
scala
project Airlock.
Run ceph demo container using docker-compose
docker-compose up
It will start Ceph demo image on port 8010.
Build the plugin jar using maven
mvn package
If you do not have a local Ceph installation to test against use mvn package -DskipTests
.
Copy the jar to ${RANGER_HOME}/ews/webapp/WEB-INF/classes/ranger-plugins/s3
. Please note that the location
is important (s3
).
Load the service definition into Apache Ranger.
curl -u <admin>:<admin> -d "@s3-ranger.json" -X POST -H "Accept: application/json" -H "Content-Type: application/json"
http://{RANGER_HOST}:{RANGER_PORT}/service/public/v2/api/servicedef
Configure the service in Apache Ranger by logging in to the Web UI.
Ranger S3 plugin uses aws sdk to connect to backend to list buckets and folders. In case of
timeouts, check ranger setting and adjust accordingly. Default 1000 may be to low in some cases.
Configuration file is in ranger-1.1.0-admin/ews/webapp/WEB-INF/classes/conf/ranger-admin-default-site.xml.
<property>
<name>ranger.resource.lookup.timeout.value.in.ms</name>
<value>10000</value>
<description />
</property>
Additionally plugin can be configured with different aws region. In order to change region, add
following section to ranger-1.1.0-admin/ews/webapp/WEB-INF/classes/conf/ranger-admin-default-site.xml.
<property>
<name>airlock.s3.aws.region</name>
<value>region_name</value>
</property>
If you run plugin via Airlock, make sure that: