Prisma Cloud keys are required to access twistcli and the Compute API. They’re also required to set up the Jenkins plugin.
It’s critical that access keys are provisioned with the minimum permissions required for the job.
Prisma Cloud Enterprise has two major security modules:
- Cloud Security Posture Management (CSPM) — Ensures continuous, correct, and compliant configuration of your resources in the public cloud.
- Cloud Workload Protection Platform (CWPP) — Provides consistent visibility and control for physical machines, virtual machines, containers and serverless workloads, regardless of location, and protects the workloads they run from attacks.
The CSPM module is accessed through Prisma Cloud’s main interface (outer management interface). The CWPP module is accessed through the
Computetab (inner management interface, also known as Prisma Cloud Compute, or just Compute). User management, such as integrating single sign-on, setting up custom roles, and creating access keys, is handled by the outer interface.
The RBAC models for the Prisma Cloud outer interface (CSPM) and Prisma Cloud inner interface (CWPP) have different design goals. The CSPM RBAC model controls who has access by cloud accounts. The CWPP RBAC model controls who has access by Compute functionality and views (e.g. who can set and see policy, who can set and see global settings, how to segment views/data, and so on). For example, Assigned Collections let you segment views by namespace.
When you create an access key in Prisma Cloud (outer interface), the system automatically maps the key to one of the Prisma Cloud Compute roles.
It’s critical that keys created for automated workflows are properly privileged on both sides.
Scanning in the CI/CD pipeline
When integrating the Jenkins plugin or twistcli into your CI/CD pipeline, configure a key with the CI User role on the Compute side. The scanner authenticates to the Compute Console’s API to assess vulnerability and compliance data. The CI User role is purpose-built for this use case. Its also the least privileged role in the system, with no access to the Console UI.
For other automated workflows, consult the Compute API documentation. The documentation specifies the minimum role required to access each endpoint.
Provisioning access keys
When provisioning access keys for Compute workflows, first create a user with the appropriate Prisma Cloud role. Then log into Prisma Cloud as the limited user and create an access key.
- Log into Prisma Cloud with a user that has the System Admin role.Only System Admins can manage users.
- Create a very limited role in Prisma Cloud that can’t do anything except log into Prisma Cloud.It will have read-only permissions with no access to any cloud account. This role will be assigned to your service account.
- In Prisma Cloud, go toSettings > Roles.
- ClickAdd New.
- InName, enter an identifier, such ascompute-svc-acct-role.
- InPermissions Group, selectAccount Group Read Only.
- LeaveAccount Groupswith its default setting, which is0 Account Groups Selected.
- Create a service account.
- In Prisma Cloud, go toSettings > Users.
- ClickAdd New.
- Enter aFirst Name,Last Name, and
- InAssign Role, selectcompute-svc-acct-role.
- SelectAllow user to create API Access Keys
- (Optional) Allow your service account to authenticate directly with Prisma Cloud.If you have integrated Prisma Cloud with a directory service, creating a new user in your underlying auth provider can be tedious in some enterprise environments. Prisma Cloud lets select users authenticate directly with Prisma Cloud using their email and a password that’s registered separately after the user account is created.
- In Prisma Cloud, go toSettings > SSO.
- EnableAllow select users to authenticate directly with Prisma Cloud.
- InUsers, select the email address you configured for your service account.
- Log out of Prisma Cloud.
- Log back into Prisma Cloud using your newly created service account.If you’re bypassing SSO, clickForgot Passwordto set a password.
- Create an access key for your service account.
- Go toSettings > Access Keys.
- ClickAdd New.
- InName, entercompute-svc-acct-key.
- Set the expiration date based on use case.
- Save your access key ID and secret key in a safe place.
Verify your access key
After provisioning your key, you can test that it can access the Compute API. Both the Jenkins plugin and twistcli wrap the API, so hitting the API directly lets you validate that your key has the proper permissions.
The path to the Compute Console API, whether you interface with it directly (e.g. curl) or indirectly (Jenkins, twistcli) is published in Compute Console itself. Get it from
Compute > Manage > System > Downloads.
- Get the path to your Console.
- Go toCompute > Manage > System > Downloads.
- UnderPath to Console, clickCopy.
- Access an endpoint for which your key is authorized.CI Users have permission to download the twistcli binary from the API, so this is a good test when setting up your CI pipeline. You can authenticate to the API using basic auth. For the username and password, specify the access key ID and secret key respectively. Both of these were generated for you when you first created the key.$ curl -k \ -u <ACCESS_KEY_ID> -o twistcli <PATH_TO_CONSOLE>/api/v1/util/twistcli
Recommended For You
Recommended videos not found.