Skip to content

SAIFTRBL0016 ยท permalink

Subscription key missing in EnvironmentBoss for an environment

If IEnvironmentClient.GetSecureSetting can't retrieve primary_subscription_key for the on-prem track your legacy app is pointed at, deploy the Experience API to the Azure environment that maps to that track โ€” the key is only registered once a deploy actually runs there. Don't file a request to manually add the key to Crypto/EnvironmentBoss for that track.


๐Ÿšจ Symptom

A legacy on-prem .NET client (for example an app with web.config pointed at enttest1) fails at the call site that retrieves the subscription key:

_environmentClient.GetSecureSetting(
    "primary_subscription_key",
    "your-project-id",  // setting group = projectId
    hash);

The call fails or returns nothing, and the client can't send Ocp-Apim-Subscription-Key, even though the Subscription Key Authentication pipeline ran successfully and you can see the key in EnvironmentBoss for some environment.

To confirm this is the issue and not a different Environment Service error, search EnvironmentBoss with a URL of this shape, swapping group for your projectId:

https://itapp.saif.com/environmentboss/settings/search?searchterm=group%3A<your-project-id>%20key%3Aprimary_subscription_key&activeoption=0&secureoption=0&pagenumber=1&sortoption=0

If the result shows primary_subscription_key for one track (for example enttest1) but not the track your on-prem app is configured for (for example np13), that's this issue, not a credentials or configuration typo.


๐Ÿ“Œ Applies to

Any Experience API using subscription_key auth with cryptoRegistration.enabled: true, called by a legacy on-prem .NET client via IEnvironmentClient/ISystemHashService. Applies whenever the on-prem track you're testing against maps to an Azure environment the API has never been deployed to. Does not apply if the key is missing from every track โ€” that points at a pipeline or variable-group problem instead (see the Crypto Registration Failures table).

Prerequisites and safety

  • You need read access to EnvironmentBoss to run the search above, and pipeline permissions to deploy the Experience API to the target Azure environment.
  • This fix only involves deploying your own API through its normal pipeline โ€” it does not change shared infrastructure.

Don't request manual Crypto/EnvironmentBoss provisioning

Don't manually add the key for a track in Crypto/Environment Service, and don't submit an Architecture ServiceNow request to do it for you. Either creates a one-off entry that drifts from the centrally owned track mapping (see Cause).


โœ… Fix

  1. Find the Azure environment that maps to the on-prem track you need in the track mapping under Subscription Key Authentication, Step 4.
  2. Make sure your variable group has [ENV]primary_key/[ENV]secondary_key entries for that Azure environment stage.
  3. Run the deploy pipeline for that stage (for example, deploy to qa to populate np13). The pipeline's register-crypto-keys activity creates the Crypto system/cipher and the Environment Service setting for that track automatically after a successful terraform apply.

If you need a mapping to a track that doesn't correspond to any existing Azure environment at all, that's a mapping gap in cloud-foundations, not something to work around per-application โ€” raise it there instead of asking for a one-off Crypto entry.


๐Ÿ”ฌ Verify

Re-run the EnvironmentBoss search from Symptom and confirm primary_subscription_key now appears for the target track.

Then, point web.config at that track and call GetSecureSetting โ€” it should return the key value instead of failing.

If the setting still doesn't appear after a successful deploy, check the deploy pipeline's register-crypto-keys activity log for errors rather than retrying the on-prem call.


๐Ÿง  Cause

Crypto/Environment Service entries aren't provisioned ahead of time for every track โ€” they're created per Azure environment, post-apply, by the register-crypto-keys activity in pipeline-templates (see Related), which reads the keys the deploy job already has from the variable group and registers them against the track mapped to that Azure environment. An application only gets a Crypto/Environment Service entry for a track once it has actually been deployed to the Azure environment that maps to it.

The azure-to-on-prem track mapping itself is centrally owned in cloud-foundations (see Related), not per-application. Manually adding a key in Crypto/EnvironmentBoss for a track your app hasn't been deployed to bypasses this pipeline step and creates an entry that isn't reflected in that source of truth.