54.2. Using RBCD to delegate access to a service


To use RBCD to delegate access to a service, add a rule on the host where the service is running. This example procedure describes how to delegate user credentials to a file server nfs/client.example.test for a web application with a Kerberos service HTTP/client.example.test. You can do this on the client.example.test host, because a host always manages services running on itself.

Prerequisites

  • You have access to the /etc/krb5.keytab file of the client.example.test host.
  • A nfs/client.example.test service keytab exists.
  • A keytab /path/to/web-service.keytab for HTTP/client.example.test exists.

Procedure

  1. On the client.example.test host, obtain a Kerberos ticket:

    # kinit -k
  2. Define the RBCD ACL:

    # ipa service-add-delegation nfs/client.example.test HTTP/client.example.test
    
    -------------------------------------------------------
    Added new resource delegation to the service principal "nfs/client.example.test@EXAMPLE.TEST"
    -------------------------------------------------------
      Principal name: nfs/client.example.test@EXAMPLE.TEST
      Delegation principal: HTTP/client.example.test@EXAMPLE.TEST

Verification

To verify that the delegation is set up correctly, you can simulate a testuser user logging in through the HTTP service and performing a protocol transition to the NFS service.

  1. View the NFS service to verify that the delegation rule is present:

    # ipa service-show nfs/client.example.test
    
      Principal name: nfs/client.example.test@EXAMPLE.TEST
      Principal alias: nfs/client.example.test@EXAMPLE.TEST
      Delegation principal: HTTP/client.example.test@EXAMPLE.TEST
      Keytab: True
      Managed by: client.example.test
  2. Obtain a Kerberos ticket for the HTTP service principal:

    # kinit -kt http.keytab HTTP/client.example.test
  3. Verify that the ticket granting ticket is present:

    # klist -f
    Ticket cache: KCM:0:99799
    Default principal: HTTP/client.example.test@EXAMPLE.TEST
    
    Valid starting       Expires              Service principal
    10/13/2023 14:39:23  10/14/2023 14:05:07  krbtgt/EXAMPLE.TEST@EXAMPLE.TEST
    	Flags: FIA
  4. Perform a protocol transition on behalf of testuser:

    # kvno -U testuser -P nfs/client.example.test
    nfs/client.example.test@EXAMPLE.TEST: kvno = 1
  5. Verify that tickets obtained during protocol transition on behalf of testuser are present:

    # klist -f
    Ticket cache: KCM:0:99799
    Default principal: HTTP/client.example.test@EXAMPLE.TEST
    
    Valid starting       Expires              Service principal
    10/13/2023 14:39:38  10/14/2023 14:05:07  HTTP/client.example.test@EXAMPLE.TEST
    	for client testuser@EXAMPLE.TEST, Flags: FAT
    10/13/2023 14:39:23  10/14/2023 14:05:07  krbtgt/EXAMPLE.TEST@EXAMPLE.TEST
    	Flags: FIA
    10/13/2023 14:39:38  10/14/2023 14:05:07  nfs/client.example.test@EXAMPLE.TEST
    	for client testuser@EXAMPLE.TEST, Flags: FAT
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部