Skip to content

Commit

Permalink
feat: remove unnecessary dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sumandas0 committed Dec 21, 2023
1 parent dbfc7b3 commit 3f986ec
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ RUN chmod +x /opt/apache-atlas/bin/repair_index.py
COPY atlas-hub/atlas_start.py.patch atlas-hub/atlas_config.py.patch /opt/apache-atlas/bin/
COPY atlas-hub/pre-conf/atlas-log4j.xml /opt/apache-atlas/conf/
COPY atlas-hub/pre-conf/atlas-log4j2.xml /opt/apache-atlas/conf/
COPY atlas-hub/pre-conf/atlas-auth/ /opt/apache-atlas/conf/

RUN curl https://repo1.maven.org/maven2/org/jolokia/jolokia-jvm/1.6.2/jolokia-jvm-1.6.2-agent.jar -o /opt/apache-atlas/libext/jolokia-jvm-agent.jar

Expand Down
139 changes: 139 additions & 0 deletions atlas-hub/pre-conf/atlas-auth/atlas-atlas-audit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration xmlns:xi="http://www.w3.org/2001/XInclude">
<property>
<name>xasecure.audit.is.enabled</name>
<value>true</value>
</property>

<!-- Solr audit provider configuration -->

<property>
<name>xasecure.audit.destination.solr</name>
<value>false</value>
</property>

<property>
<name>xasecure.audit.destination.solr.urls</name>
<value>NONE</value>
</property>

<property>
<name>xasecure.audit.destination.solr.zookeepers</name>
<value></value>
</property>

<property>
<name>xasecure.audit.destination.solr.collection</name>
<value>NONE</value>
</property>


<!-- HDFS audit provider configuration -->
<property>
<name>xasecure.audit.destination.hdfs</name>
<value>false</value>
</property>

<property>
<name>xasecure.audit.destination.hdfs.dir</name>
<value>hdfs://__REPLACE__NAME_NODE_HOST:8020/ranger/audit</value>
</property>

<property>
<name>xasecure.audit.destination.hdfs.subdir</name>
<value>%app-type%/%time:yyyyMMdd%</value>
</property>

<property>
<name>xasecure.audit.destination.hdfs.filename.format</name>
<value>%app-type%_ranger_audit_%hostname%.log</value>
</property>

<property>
<name>xasecure.audit.destination.hdfs.file.rollover.sec</name>
<value>86400</value>
</property>

<!-- Audit to HDFS on Azure Datastore (WASB) requires v3 style settings. Comment the above and uncomment only the
following to audit to Azure Blob Datastore via hdfs' WASB schema.
NOTE: If you specify one audit destination in v3 style then other destinations, if any, must also be specified in v3 style
====
<property>
<name>xasecure.audit.destination.hdfs</name>
<value>enabled</value>
</property>
<property>
<name>xasecure.audit.destination.hdfs.dir</name>
<value>wasb://[email protected]</value>
</property>
the following 3 correspond to the properties with similar name in core-site.xml, i.e.
- fs.azure.account.key.youraccount.blob.core.windows.net => xasecure.audit.destination.hdfs.config.fs.azure.account.key.youraccount.blob.core.windows.net and
- fs.azure.account.keyprovider.youraccount.blob.core.windows.net => xasecure.audit.destination.hdfs.config.fs.azure.account.keyprovider.youraccount.blob.core.windows.net,
- fs.azure.shellkeyprovider.script => xasecure.audit.destination.hdfs.config.fs.azure.shellkeyprovider.script,
<property>
<name>xasecure.audit.destination.hdfs.config.fs.azure.account.key.youraccount.blob.core.windows.net</name>
<value>YOUR ENCRYPTED ACCESS KEY</value>
</property>
<property>
<name>xasecure.audit.destination.hdfs.config.fs.azure.account.keyprovider.youraccount.blob.core.windows.net</name>
<value>org.apache.hadoop.fs.azure.ShellDecryptionKeyProvider</value>
</property>
<property>
<name>xasecure.audit.destination.hdfs.config.fs.azure.shellkeyprovider.script</name>
<value>/usr/lib/python2.7/dist-packages/hdinsight_common/decrypt.sh</value>
</property>
-->

<!-- Log4j audit provider configuration -->
<property>
<name>xasecure.audit.destination.log4j</name>
<value>false</value>
</property>

<property>
<name>xasecure.audit.destination.log4j.logger</name>
<value>AUTH_AUDIT</value>
</property>

<!-- ElasticSearch audit provider configuration -->
<property>
<name>xasecure.audit.destination.elasticsearch</name>
<value>true</value>
</property>
<property>
<name>xasecure.audit.elasticsearch.is.enabled</name>
<value>true/</value>
</property>
<property>
<name>xasecure.audit.destination.elasticsearch.urls</name>
<value>logging-master.logging.svc.cluster.local</value>
</property>
<property>
<name>xasecure.audit.destination.elasticsearch.index</name>
<value>ranger-audit</value>
</property>
</configuration>
20 changes: 20 additions & 0 deletions atlas-hub/pre-conf/atlas-auth/atlas-atlas-security-changes.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Change the original policy parameter to work with policy manager based.
#
#
atlas.plugin.atlas.service.name %REPOSITORY_NAME% mod create-if-not-exists

88 changes: 88 additions & 0 deletions atlas-hub/pre-conf/atlas-auth/atlas-atlas-security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration xmlns:xi="http://www.w3.org/2001/XInclude">
<property>
<name>atlas.plugin.atlas.service.name</name>
<value>atlas</value>
<description>
Name of the Ranger service containing policies for this YARN instance
</description>
</property>

<property>
<name>atlas.plugin.atlas.policy.source.impl</name>
<value>org.apache.atlas.authz.admin.client.AtlasAuthRESTClient</value>
<description>
Class to retrieve policies from the source
</description>
</property>

<property>
<name>atlas.plugin.atlas.authz.rest.url</name>
<value>localhost:21000/api/atlas/v2/auth</value>
<description>
URL to Ranger Admin
</description>
</property>

<property>
<name>atlas.plugin.atlas.policy.rest.ssl.config.file</name>
<value>/etc/atlas/conf/ranger-policymgr-ssl.xml</value>
<description>
Path to the file containing SSL details to contact Ranger Admin
</description>
</property>

<property>
<name>atlas.plugin.atlas.policy.pollIntervalMs</name>
<value>30000</value>
<description>
How often to poll for changes in policies?
</description>
</property>

<property>
<name>atlas.plugin.atlas.policy.cache.dir</name>
<value>/etc/atlas/atlasdev/policycache</value>
<description>
Directory where Ranger policies are cached after successful retrieval from the source
</description>
</property>

<property>
<name>atlas.plugin.atlas.policy.rest.client.connection.timeoutMs</name>
<value>120000</value>
<description>
RangerRestClient Connection Timeout in Milli Seconds
</description>
</property>

<property>
<name>atlas.plugin.atlas.policy.rest.client.read.timeoutMs</name>
<value>120000</value>
<description>
AtlasAuth read Timeout in Milli Seconds
</description>
</property>

<property>
<name>atlas.plugin.atlas.policyengine.option.disable.tag.retriever</name>
<value>true</value>
</property>
</configuration>

0 comments on commit 3f986ec

Please sign in to comment.