Authentication & Authorization in Apache Atlas.

Authentication

Atlas supports following authentication methods

  • File
  • Kerberos
  • LDAP

Following properties should be set true to enable the authentication of that type in atlas-application.properties file.

atlas.authentication.method.kerberos=true|false
atlas.authentication.method.ldap=true|false
atlas.authentication.method.file=true|false

If two or more authentication methods are set to true, then the authentication falls back to the latter method if the earlier one fails. For example if Kerberos authentication is set to true and ldap authentication is also set to true then, if for a request without kerberos principal and keytab LDAP authentication will be used as a fallback scenario.

FILE method.

File authentication requires users' login details in users credentials file in the format specified below and the file path should set to property atlas.authentication.method.file.filename in atlas-application.properties.

atlas.authentication.method.file=true
atlas.authentication.method.file.filename=${sys:atlas.home}/conf/users-credentials.properties

The users credentials file should have below format

username=group::sha256-password

For e.g.

admin=ADMIN::e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221a

Users group can be either ADMIN, DATA_STEWARD OR DATA_SCIENTIST

Note:-password is encoded with sha256 encoding method and can be generated using unix tool.

For e.g.

echo -n "Password" | sha256sum
e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221a  -

Kerberos Method.

To enable the authentication in Kerberos mode in Atlas, set the property atlas.authentication.method.kerberos to true in atlas-application.properties

atlas.authentication.method.kerberos = true

Also following properties should be set.

atlas.authentication.method.kerberos.principal=<principal>/<fqdn>@EXAMPLE.COM
atlas.authentication.method.kerberos.keytab = /<key tab filepath>.keytab
atlas.authentication.method.kerberos.name.rules = RULE:[2:$1@$0](atlas@EXAMPLE.COM)s/.*/atlas/
atlas.authentication.method.kerberos.token.validity = 3600 [ in Seconds (optional)]

LDAP Method.

To enable the authentication in LDAP mode in Atlas, set the property atlas.authentication.method.ldap to true and also set Ldap type to property atlas.authentication.method.ldap.type to LDAP or AD in atlas-application.properties. Use AD if connecting to Active Directory.

atlas.authentication.method.ldap=true
atlas.authentication.method.ldap.type=ldap|ad

For LDAP or AD the following configuration needs to be set in atlas application properties.

Active Directory

atlas.authentication.method.ldap.ad.domain= example.com
atlas.authentication.method.ldap.ad.url=ldap://<AD server ip>:389
atlas.authentication.method.ldap.ad.base.dn=DC=example,DC=com
atlas.authentication.method.ldap.ad.bind.dn=CN=Administrator,CN=Users,DC=example,DC=com
atlas.authentication.method.ldap.ad.bind.password=<password>
atlas.authentication.method.ldap.ad.referral=ignore
atlas.authentication.method.ldap.ad.user.searchfilter=(sAMAccountName={0})
atlas.authentication.method.ldap.ad.default.role=ROLE_USER

LDAP Directroy

atlas.authentication.method.ldap.url=ldap://<Ldap server ip>:389
atlas.authentication.method.ldap.userDNpattern=uid={0],ou=users,dc=example,dc=com
atlas.authentication.method.ldap.groupSearchBase=dc=example,dc=com
atlas.authentication.method.ldap.groupSearchFilter=(member=cn={0},ou=users,dc=example,dc=com
atlas.authentication.method.ldap.groupRoleAttribute=cn
atlas.authentication.method.ldap.base.dn=dc=example,dc=com
atlas.authentication.method.ldap.bind.dn=cn=Manager,dc=example,dc=com
atlas.authentication.method.ldap.bind.password=<password>
atlas.authentication.method.ldap.referral=ignore
atlas.authentication.method.ldap.user.searchfilter=(uid={0})
atlas.authentication.method.ldap.default.role=ROLE_USER

Authorization

Atlas Authorization Methods [Simple/Ranger]

To set authorization in atlas, update the atlas.authorizer.impl properties in atlas-application.properties

  • Simple
  • Ranger
atlas.authorizer.impl=simple | ranger | <Qualified Authorizer Class Name>

Simple Authorizer.

In Simple Authorizer the policy store file is configured locally. The path of policy store file is set in atlas.auth.policy.file property of atlas-application.properties

atlas.auth.policy.file={{conf_dir}}/policy-store.txt

The policy store file format is as follows:

Policy_Name;;User_Name:Operations_Allowed;;Group_Name:Operations_Allowed;;Resource_Type:Resource_Name

eg. of admin policy:

adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:*,taxonomy:*,term:*

Note : The User_Name, Group_Name and Operations_Allowed are comma(,) separated lists.

Authorizer Resource Types:

  • Operation
  • Type
  • Entity
  • Taxonomy
  • Term
  • Unknown

Operations_Allowed are r = read, w = write, u = update, d = delete

Ranger Authorizer.

Ranger Authorizer is enabled by activating Atlas-Ranger plugin from Ambari.

For more details visit the Apache-Ranger documentation.