Identity, access, and keys,
one layer for each protection.
How authentication, authorization, perimeter, encryption, and auditing combine in TDP Datacenter, with the security services enabled and configured through Ambari.
Topics on this page
- Authentication with Kerberos
- Authorization with Ranger and service permissions
- Access through Knox and network protection
- Encryption in transit and in HDFS
- Auditing and traceability
Authentication with Kerberos
Kerberos authenticates users and services through temporary tickets.
In a secured cluster, service identities use principals and keytabs. Users obtain the tickets they need to access the integrated services.
In TDP Datacenter, Kerberos can be enabled through the Ambari Kerberos wizard, with MIT Kerberos or Active Directory, according to the KDC and the directory defined for the environment.
With Ambari identity management, Ambari itself creates and maintains the principals and keytabs of the services.
Enabling it applies to the whole cluster and relies on time synchronization and name resolution between the machines, provided for in the installation requirements.
Authentication identifies who requests the operation.
The permissions to perform it are defined in the authorization layer.
Ambari security administration and the settings of each service. Concepts and requirements in Kerberos.
Authorization with Ranger and service permissions
Ranger centralizes policies and distributes the rules to the plugins of the protected services.
In Ambari, the Ranger plugin is enabled per service, and the policies of all integrated services are managed in Ranger.
The audit destinations of the plugins, such as Solr and HDFS, are defined in the Ranger service (xasecure.audit.destination.solr and xasecure.audit.destination.hdfs in ranger-env).
Each plugin evaluates requests within its own service. Therefore, the integration must be enabled on the access path in use.
| Layer | Services with a Ranger plugin |
|---|---|
| Storage | HDFS, HBase and Ozone |
| Query and search | Hive, Trino and Solr |
| Ingestion and events | Kafka, NiFi and NiFi Registry |
| Processing | YARN |
| Access and catalog | Knox and Atlas |
| Keys | Ranger KMS |
The Ranger plugin is available for Trino, HDFS, Hive, Kafka, Knox, YARN, NiFi, NiFi Registry, HBase, Solr, Atlas and Ozone, and is enabled in the settings of each service in Ambari (ranger-<service>-plugin-enabled).
The users and groups used in policies reach Ranger through UserSync, enabled in Ambari (ranger.usersync.enabled).
The identity source can be the Unix users and groups of the operating system or an LDAP or Active Directory directory, as configured in Ambari (ranger.usersync.source.impl.class and ranger.usersync.ldap.url).
Data
HDFS and Hive
Directory and file permissions and table access policies cover different paths. Direct access to HDFS is also part of the permission design.
Events
Kafka
Policies can control operations on topics in the brokers integrated with Ranger.
Administration
Separate roles
In Ranger, those who manage policies, those who use the data and those who review the audit records can have distinct roles.
The Ranger plugin options are in the settings of each service in Ambari, and native permissions, such as HDFS permissions and ACLs, also apply according to the integration and the rules adopted.
In HDFS, permission checking and ACLs are enabled on the NameNode, through Ambari (dfs.permissions.enabled and dfs.namenode.acls.enabled).
In addition to resource-based access policies, Ranger offers, in query services such as Hive and Trino, masking and row-filter policies, as well as tag-based policies.
Masking policies change the displayed value of a column at query time, with redaction, partial display, hash, a null value or a custom expression.
Row-filter policies limit the rows of a table that each user or group can query.
Tag-based policies apply access rules based on the classification of the data.
In data governance, Apache Atlas catalogs and classifies data assets, with search and lineage.
Integrated with Atlas, Ranger can apply policies based on the tags defined in the catalog: the classification of a dataset then guides the permissions of users and groups on it.
Tags reach Ranger through TagSync, which can use Atlas as its source (ranger.tagsync.source.atlas).
The use of classifications for personal data is described in Privacy.
Ranger plugins in the settings of each service in Ambari and policies in Ranger Admin. Details in Apache Ranger and Apache Atlas.
Access through Knox and network protection
Knox is the API gateway that concentrates, at a single HTTPS address, external access to the APIs and interfaces published in the topologies.
Each topology, managed by Ambari, defines the published services and the authentication and authorization providers used.
The port and the context path on which the gateway listens are defined in the Knox configuration, in Ambari (gateway.port and gateway.path, in gateway-site).
With the Ranger plugin enabled in Knox, access through the gateway also goes through Ranger policies and is included in auditing.
This gateway is one entry path: the networks and clients that reach the internal services directly remain a decision of the environment.
Knox topologies work together with the network rules, ports and permissions of each service.
Knox service in Ambari, gateway topologies and environment network controls. Details in Apache Knox.
Encryption in transit and in HDFS
TLS can protect connections exposed by Knox and by the other services, according to the options available in each component.
Certificates, trust between clients and servers and renewal procedures are defined for the environment.
Encryption at rest of data in HDFS uses encryption zones, with the keys managed in Ranger KMS, the key manager for HDFS transparent encryption.
To do so, the HDFS key provider (dfs.encryption.key.provider.uri, with hadoop.security.key.provider.path) points to Ranger KMS.
The key provider, its permissions and the zone are configured before writing the files that need this protection.
Authorized clients depend on access to the KMS to obtain the required cryptographic material.
TLS options of the services and HDFS key provider. Details in Ranger KMS and HDFS transparent encryption.
Auditing and traceability
With auditing enabled in the integrated services, Ranger records relate user, resource, operation and authorization decision.
With the default destinations of the Ranger service, events go to Solr, from which Ranger Admin queries them, and to HDFS.
The destinations are in the audit settings of each service, and the retention period follows the company policy.
Logs from the services themselves and from Knox complement the investigation.
These records can also contain identifiers and information about the accessed data, and their retention and access follow the same care given to the data.
Ranger Admin and logs of the service involved. Use in investigations in Observability in Datacenter.
Scenario: customer service queries for an analytics team
Situation: a company gives an analytics team access to query customer service data stored in Hive tables, and access from outside the cluster must go through a single entry point.
What TDP does: with Kerberos enabled through the Ambari wizard and integrated with the company's Active Directory, analysts authenticate with their directory accounts, and Ranger UserSync, with Active Directory as the source, brings the groups into the policies.
With the Ranger plugin enabled in Hive, HDFS and Knox, a Hive policy grants the team's group only the tables needed for the analysis, and the HDFS plugin restricts direct access to the files of those tables.
External access goes through the Knox gateway.
Effect: the team queries only the granted tables, and Ranger auditing records who queried each table, with the events in Solr and HDFS, for the periodic review of usage.