OBLYTECH Logo
OBLYTECH Logo

Module Access Policies

A ServiceNow module access policy controls access to a cryptographic module so permitted users, scripts, and system processes can encrypt or decrypt data. For Field Encryption, start with a published module, choose the caller and permitted operation, then test the resulting access. Review policy results and execution context before widening permissions.

Define the ServiceNow module access policy requirement

Module access policies, or MAPs, govern cryptographic module access. They are separate from access control lists and can work alongside them. A user reaching a record does not establish that the caller has permission to use its encryption module. Without an appropriate MAP, encryption or decryption can fail and interrupt the surrounding workflow.

Begin by writing down the module, the caller, and the required operation. For example, a data-entry role might need to encrypt a value without reading it afterward. A reviewer might need decryption without permission to replace the value. Treat those as separate requirements rather than starting with a broad permission and narrowing it after testing.

Field Encryption supports Role policies; the additional policy types require Field Encryption Enterprise. The available choices and screens below follow Brazil behavior: check your instance, release, and subscription before applying them. For the broader cryptographic structure, use the ServiceNow Key Management Framework guide.

Configure access from the Field Encryption module

The Field Encryption configuration procedure lists security_admin and sn_kmf.cryptographic_manager or sn_kmf.admin as its required roles. A published field encryption module is a prerequisite. Establish both before opening the policy form; an unpublished module is not ready for this procedure.

  1. Navigate to All > System Security > Field Encryption > Field Encryption Experience.
  2. Select Access Policies in the appropriate module tile.
  3. Enter Policy Name and select the Crypto Module that the policy will govern.
  4. Choose Type according to the caller needing access, then complete its target fields.
  5. Select Result, enable Active when the policy should apply, and select Submit.

For Type set to Role, Target Role identifies the role receiving the policy. Scope exposes Target Scope for the relevant application scope. Script uses Script Table and Target Script to identify the script. System Access applies to processes executing in system context. Resource Exchange exposes its own sharing fields. Match the policy to the caller you identified, rather than selecting whichever type appears easiest to configure.

Review the module identity before submission. A correctly named policy attached to the wrong module does not address the intended requirement. Include the module and caller in your change notes so another administrator can reproduce the test without guessing which configuration you meant.

Choose the result and the cryptographic operation

The Result field changes the access decision. Track permits access and monitors MAP use. Reject denies access unless another MAP grants it. StrictReject denies access even when a different MAP grants access. Do not treat Reject and StrictReject as interchangeable ways to disable an unwanted grant.

Use Specify Purpose when access needs to distinguish encryption from decryption. Enabling it exposes Crypto Spec. After a specification is selected, Granular Operation offers the purposes supported by that specification. Choose the operation from the actual available values; the selection depends on the specification rather than a universal list of permissions.

  • Encrypt access without decrypt access leaves the field editable, while entered data appears as asterisks.
  • Decrypt access without encrypt access shows decrypted data in read-only mode.
  • Encrypt and decrypt access provide both read and write functionality for the encrypted field.

Turn those differences into acceptance criteria. For an entry role, check that a value can be entered and that the displayed masking matches the intended access. For a reviewer, check the readable value and read-only behavior. Record the expected outcome before testing so a visible value is not mistaken for proof that the whole permission design is correct.

When these decisions span multiple roles and workflow callers, define the permission matrix and test cases as part of your ServiceNow implementation planning. Resolve who needs each operation before expanding access across the workflow.

Handle scripts, impersonation, and inbound attachments

For a Script policy, Script Table identifies the script category and Target Script identifies the specific script. Supported categories are Access Control, Activity Designer, Business Rule, Inbound Email Action, Record Producer, Scheduled Script Execution, Script Include, UI Action, Widget, and Workflow Activity. Check Script Version compares the executing script version with the version specified in Target Script and notifies the administrator when they differ.

Plan a script-change test as well as an initial access test. Capture which script version was accepted, make the intended change through your normal change process, and inspect the resulting behavior. Do not assume a successful test of an earlier version establishes access for a changed script.

Impersonation also affects the test. When Impersonation is enabled, an impersonating user receives MAP permissions from both users. When disabled, the impersonating user retains the MAP permissions granted before impersonation. Keep this setting in the test record; otherwise, a test session can represent a different permission combination than the one you intended to assess.

Inbound email attachments need special attention to execution context. Attachments from an email matched to a record become associated with that record. When its table has an encryption configuration, a system MAP is required for processing as the system user, which is the default behavior. A user MAP is required when processing runs as a matched user. For a role-based user MAP, enable impersonation.

Cover both contexts when the workflow uses both. A system MAP alone does not encrypt attachments associated during a user process. Test the attachment outcome in each intended processing context and retain the caller identity with the result. Broader access decisions can be documented alongside your policy and compliance access design.

Inspect the effective access before closing the change

Users with sn_kmf.admin or sn_kmf.cryptographic_manager can access module access policy visualization through All > Key Management > Cryptographic Modules > All. Use it to inspect the controls associated with the selected module, then compare what it shows with your intended caller list.

The Global policies section covers Default rule, Platform backend, Script engine, and System user. Manage opens an existing policy record; Add appears where a policy does not exist. Granular policies lists policies by type and initially displays active policies. Adjust the list filter if your investigation needs inactive records. Users with access groups the access list by user because one user can hold multiple granting roles.

Use the debugger when a real access attempt still needs explanation. Access to its logs is available to the sn_kmf.admin and sn_kmf.cryptographic_manager roles. The glide.kmf.module_access_policies.debugger.authorized.roles system property can authorize additional roles through a comma-separated list.

  1. Open All > Diagnostics > Session Debug > Debug Module Access Policies.
  2. Navigate to a page that triggers evaluation and inspect the messages at the bottom.
  3. Identify the requested module, evaluated policies in order, their granular operations and results, and the final access decision.
  4. Finish through All > Diagnostics > Session Debug > Disable All.

Match the final decision to the requested operation. A caller can receive encryption access while decryption is denied. If the symptom is an empty encrypted field, inspect whether a MAP exists and whether the user has the required role before changing data. For adjacent investigation steps, use the instance security troubleshooting guide.

Close the change with a compact test record: module name, caller, selected operation, expected field behavior, observed decision, and policy responsible. Include an intended denied case alongside an intended allowed case. If a denied test unexpectedly succeeds, inspect the other evaluated policies before changing the tested record. This keeps the next change focused on the access decision that produced the result, rather than on a symptom seen elsewhere in the workflow.

Questions about policy edge cases

Can I create a policy from Key Management instead?

Yes. The KMF creation procedure requires sn_kmf.cryptographic_manager or sn_kmf.admin. Navigate to All > Key Management > Module Access Policies > All and select New. That form uses labels such as Policy name and System user, so follow the labels on that screen.

Will an automatically generated policy cover Field Encryption?

Do not rely on that fallback. Autogen policies derive from a cryptographic module’s default policy when granular policies are absent, but Autogen rules do not apply to scheduled job types or modules whose parent is Field Encryption. Plan explicit access for the relevant callers.

What does N/A mean in the visualization?

N/A means the policy does not exist on the instance and access is denied to all for that entry. Distinguish this from an existing policy whose Result denies access. The next investigation is whether the intended policy record exists.

Which fields matter for Resource Exchange?

In the Field Encryption policy form, Approval Type offers One Time or Recurring for sharing the symmetric data encryption key. Target Instance Host identifies the receiving instance. These fields appear for Resource Exchange; review the intended recipient and sharing pattern before submitting that policy.