Personal tools

rPath Appliance Platform Agent:Entitlements File

From rPath Wiki

Jump to: navigation, search
rPath Appliance Platform --> Agent --> Entitlements File

To use the rPath Appliance Platform Agent (rAPA) Entitlements plugin, the file /etc/conary/entitlements.xml must exist on the appliance. If the repository is not available to anonymous users, this file and uploaded entitlements are required for repository access, such as for appliance updates.

The entitlements.xml files for appliance products are automatically generated for for vendors using the Entitlement Service Appliance (including rPath). Obtain the file by clicking the entitlements.xml link beside the appropriate entitlement channel in the Product Channels list.

Appliance developers should plan to include the appropriate entitlements.xml in addition to the Entitlements plugin when developing an appliance using entitlements. Without entitlements.xml, the plugin is disabled at each rAPA startup.

The following is an example entitlements.xml. Note the file structure:

 
 <?xml version="1.0"?>
 <entitlement>
  <host name="products.rpath.com">
   <class name="rbuilder"/>
  </host>
  <host name="sample.example.com">
   <class name="rap"/>
  </host>
 </entitlement>

Each host name matches the repository map to a Conary repository on the product channel. Each class maps to an entitlement class associated with the repository. Each entitlement class defines a set of permissions for repository contents.

When a rAPA user adds or modifies entitlement keys in the web interface, the appliance uses the information in entitlements.xml plus the uploaded key to generate supporting entitlement files. The following shows /etc/conary/entitlements/conary.rpath.com generated from the example entitlements.xml:

 
 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <!DOCTYPE entitlement [
          <!ELEMENT entitlement (server, class, key)>
          <!ELEMENT server (#PCDATA)>
          <!ELEMENT class (#PCDATA)>
          <!ELEMENT key (#PCDATA)>
      ]>
      <entitlement>
          <server>products.rpath.com</server>
          <class>rbuilder</class>
          <key><ENTITLEMENT KEY HERE></key>
      </entitlement>

If entitlements.xml changes, the existing entitlement files are regenerated to associate with the revised entitlements.xml. The regeneration is triggered when rAPA is restarted after the file update.