Skip to main content Link Menu Expand (external link) Document Search Copy Copied


Table of contents

  1. Create Sol Cerberus app
  2. Adding SC app ID to an Anchor program

Create Sol Cerberus app

The Sol Cerberus app manages roles and permissions, enforcing the access rules in your Solana program. There are two ways to create your SC app, you can either:

Normally you would use an independent SC app for each Solana program, but you can also use multiple SC apps, allowing your users to setup/manage their own access permissions.

Adding SC app ID to an Anchor program

The Anchor program needs to know the SC app ID in order to be able to authenticate requests. To add the SC app ID generated on previous step into your Anchor program, create a constant called SOL_CERBERUS_APP_ID within the file located at ./programs/NAME-OF-YOUR-PROGRAM/src/ of your anchor program:

 # Your program ID (will be different on each program)

# Add the following line using your own Sol Cerberus app ID:

pub mod my_anchor_program {

    use super::*;