CyberArk Conjur Service Broker for PCF (Beta)
Warning: The CyberArk Conjur Service Broker for PCF tile is currently in beta and is intended for evaluation and test purposes only. Do not use this product in a PCF production environment.
This documentation describes the CyberArk Conjur Service Broker for Pivotal Cloud Foundry (PCF). This Service Broker provides Conjur machine identity management and authentication, policy-based authorization, and other Conjur services to your PCF applications and microservices.
The CyberArk Conjur Service Broker for PCF registers a service broker with PCF and exposes its service plans on the Marketplace. Developers can then create applications that access a Conjur instance. The Service Broker provides the interface between your PCF applications and a Conjur instance.
The CyberArk Conjur Service Broker for PCF installs a buildpack that leverages the Conjur Summon tool. Summon fetches secrets from Conjur using the binding ID from your PCF service as the unique application identity.
CyberArk Conjur Service Broker for PCF includes the following key features:
- After you configure the tile and bind applications to service instances, your PCF applications, containers, and microservices assume a host identity in Conjur. This identity enables secure access to secrets stored in Conjur.
- If you have an existing Conjur instance, you can grant privileges to PCF applications to access the existing Conjur secrets through Conjur policy.
- Conjur integrates easily into the PCF environment and the PCF developer workflow.
- The strong authentication model provided by Conjur is available to PCF applications.
- The Conjur role-based policy model for authorizations applies to applications running in PCF.
- Access to secrets is configurable at the PCF application level, making it easy to ensure least privilege access.
The following table provides version and version-support information about CyberArk Conjur Service Broker for PCF.
|Release date||March 7, 2019|
|Software component version||CyberArk Conjur Service Broker - v1.0.0
CyberArk Conjur Buildpack - v2.0.0
|Compatible Ops Manager version(s)||v2.1.x, v2.2.x, v2.3.x, and v2.4.x|
|Compatible Pivotal Application Service version(s)||v2.1.x, v2.2.x, v2.3.x, and v2.4.x|
|BOSH stemcell version||Ubuntu Xenial|
|IaaS support||AWS, Azure, GCP, OpenStack, and vSphere|
WARNING: CyberArk Conjur Service Broker for PCF v0.3.3 and earlier require a Ubuntu Trusty stemcell. The end-of-life date for Ubuntu Trusty is April 2019. If a security vulnerability is found on this stemcell after April, it will not be fixed.
CyberArk Conjur Service Broker for PCF has the following requirements:
You must have an existing Conjur instance installed. The Conjur instance may be external to the PCF environment. Supported versions are:
- Conjur Enterprise (v18.104.22.168 and later)
- Use v22.214.171.124 or later to search for CF hosts in the Conjur UI
- Conjur Open Source (v1.0 and later)
- Hosted Conjur is a hosted version of Open Source Conjur. You can quickly get a hosted Conjur instance running for evaluation purposes. Visit the hosted Conjur page to sign up.
- Conjur Enterprise (v126.96.36.199 and later)
To configure the PCF tile, you must know the following information about your Conjur installation:
Conjur Account Specified when Conjur is installed and configured. For hosted Conjur, the account is usually an email address that you specify on the web form. URL of the Conjur Instance May be the Conjur master load balancer if deploying in a High Availability (HA) configuration. Conjur Host Id for Service Broker Valid Conjur identity for a host that has
createprivileges on PCF-related Conjur policy. The Service Broker uses these credentials to add and remove host identities as you deploy and remove PCF applications. See Recommendations.
Conjur API key The Conjur API key associated with the Conjur Host Id for the service broker above. PCF Conjur Policy Branch ID
For production Conjur appliances, CyberArk strongly recommends a Conjur policy dedicated to PCF; otherwise, the Conjur root policy is the default. See Recommendations for more information. URL of the Conjur Follower Load Balancer
(Conjur Enterprise v5.x+)
If deploying a cluster in an HA configuration, you can specify a URL for PCF apps to connect to a Conjur follower to retrieve secret values rather than through the Conjur master. Cyberark strongly recommends that you supply a load balanced follower address to support easier scalability. X.509 CA Certificate Chain for Conjur
(Required for TLS/HTTPS connections to Conjur)
The PEM encoded X.509 certificate chain for the Conjur server.
This certificate chain may be retrieved from the Conjur server using the command:
$ openssl s_client -showcerts -servername [CONJUR_DNS_NAME] \ -connect [CONJUR_DNS_NAME]:443 < /dev/null 2> /dev/null \ | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----
The Conjur Service Broker requires that each space have its own service instance.
Conjur Service instances may not be shared across spaces. In the interest of least privilege, a single Conjur service instance must be provisioned in each space where it is needed, using:
$ cf create-service cyberark-conjur community my-service-instance-name
(Conjur EE v4.x only) Conjur Host Factory
The Service Broker requires a Conjur host factory to use when adding host identities. The examples in Recommendations include host factory definitions. If a host factory is not properly defined, a health check near the end of tile installation will report the condition, and the tile installation will fail.
Create a Dedicated Conjur Policy for PCF
CyberArk strongly recommends that you create a Conjur policy dedicated to PCF before installing the PCF tile.
This policy should include a unique identifier for the foundation (e.g.
production) to make managing Conjur
policy easier across multiple PCF installation.
The syntax for defining a Conjur Policy with ID
pcf/production is as follows:
- !policy id: pcf body: - !policy id: production
This can be loaded into the root policy or any desired Conjur policy branch. Host identities for
PCF-deployed applications will be loaded into the
pcf/production Conjur policy branch when the
applications are bound to a Conjur service instance.
A dedicated Conjur policy for PCF supports least privilege principles in the following ways:
- The secrets, host identities, and access control policies for your PCF-deployed applications are isolated from other resources stored in Conjur.
- Conjur access privileges required by the Service Broker, DevOps teams, and your applications can be limited in scope to the dedicated Conjur policy for PCF.
- You can give a limited set of Conjur users access to the dedicated Conjur policy for PCF, with even finer-grained permissions possible within the PCF policy itself.
- For Conjur Enterprise (v4), you can define the host factory layer in the dedicated Conjur policy for PCF, rather than in the root policy.
When creating the dedicated Conjur policy for PCF, consider the following:
- The Service Broker requires
updateprivileges on the policy to add and remove host identities. Members of the group that owns the policy have those privileges.
- PCF DevOps personnel need access to Conjur to declare application secrets and grant privileges to the applications to access those secrets.
- For Conjur Enterprise (v4), a host factory is required. Both the ID of the layer and the host factory must use the syntax
appsis a constant. For example,
pcf/production-appsis used in the policy example shown below where the dedicated policy for PCF is called
To create a dedicated Conjur policy for PCF, do the following:
Create a policy using the following example as a guide. Save the policy as a YAML file (such as
- !host id: pcf-service-broker annotations: platform: pivotalcloudfoundry - !group id: pcf-admin-group - !grant role: !group pcf-admin-group member: !host pcf-service-broker # Allow host read access to its own resource, to read annotations - !permit role: !host pcf-service-broker privilege: read resource: !host pcf-service-broker - !policy id: pcf # Policy ID does not have to be pcf body: - !policy id: production # Multiple PCF Foundations may be identified using # a sub-policy branch, e.g. "production". owner: !group /pcf-admin-group # Owners have complete privileges on the policy # The policy body, layer, and host factory # are required for Conjur EE v4: body: # Layer name and host-factory name must be [policy-id]-apps - !layer pcf/production-apps - !host-factory id: pcf/production-apps layers: [ !layer pcf/production-apps ]
This policy file creates a
host/pcf-service-broker host that can be used as the
in the tile configuration. The
pcf-service-broker host is a member of the
pcf-admin-group group, which
pcf/production policy, so it has
update privileges on that policy as required.
The PCF policy has a
pcf/production-apps layer and corresponding host factory. If using Conjur v4, application
hosts will be added to the
pcf/production-apps layer via the
pcf-apps host factory when the application is
bound to a Conjur service instance.
Load the policy into Conjur as follows (in this example, we are loading it into the root policy):
For Conjur Enterprise v4:
$ conjur policy load --as-group security_admin your-pcf-policy-file.yml
NOTE: You may have to first install the
policyplugin for the Conjur CLI. If you receive this message when loading the policy:
$ conjur policy load ... error: Unknown command 'policy'
Then you may install the
policyplugin using the command:
$ conjur plugin install policy Successfully installed conjur-asset-policy-0.13.0 1 gem installed
For Conjur Open Source and Conjur Enterprise v5:
$ conjur policy load root your-pcf-policy-file.yml
Loading this policy the first time will output the API key for the
pcf-service-broker host. Save
this key to use when configuring the PCF tile below.
In the CyberArk Conjur Service Broker for PCF tile configuration:
For PCF Conjur Policy Branch ID, use the fully-qualified ID of the dedicated Conjur policy for PCF (
pcf/productionin the above example).
For Conjur Login, use a Conjur host who is a member of the Conjur group that owns the PCF policy (
host/pcf-service-brokerin the example above). The host also needs to be permitted to read its own annotations.
For Conjur API Key, use that host’s API key. The admin who created the role can retrieve the value with this command:
$ conjur host rotate_api_key -h pcf-service-broker
Using the Default Root Policy
If you decide to leave the PCF Conjur Policy Namespace blank in the tile configuration (that is, you choose to use the default root policy), consider the following:
- You are not following least privilege best practice.
- The Conjur host identity that you provide on tile installation must have
updateprivileges on the root policy, which means that it will be privileged to edit any policy in your Conjur installation.
- The Service Broker will add host identities for your PCF applications to the root policy.
- The PCF DevOps teams will be altering policy files in the root policy.
For integration with Conjur v4, a Host Factory named
appsis required. Add the following layer declaration to the root policy:
- !layer apps - !host-factory id: apps layers: [ !layer apps ]
There are no known limitations.
Copyright 2019 CyberArk
Licensed under the Apache License, Version 2.0 (the “License”). You may not use this software except in compliance with the License. You may obtain a copy of the License at:
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.