The AI and Cloud Native Blog

Enforcing ServiceNow-Based Approvals with Rafay

Enterprises often require explicit approvals before critical actions can proceed especially when provisioning infrastructure or making configuration changes. With Rafay’s out-of-the-box (OOB) workflow handlers, customers can easily integrate with popular ITSM systems such as ServiceNow (SNOW).

Workflow Handlers in Rafay

Rafay enables platform teams to attach Workflow Handlers to key actions as pre-hooks or post-hooks:

  • Pre-hook Handlers: Triggered before an action (e.g., pause provisioning until approval is received)
  • Post-hook Handlers: Triggered after an action (e.g., notify stakeholders after infrastructure (environment) creation)

Typical Scenarios

Here are a few use cases where ServiceNow-based approvals come into play:

  • Developers request a vCluster to test their app before raising a PR
  • Platform admins initiate a Kubernetes upgrade for a fleet of clusters that requires approval

Approval Workflow Overview

1. User Initiates an Action

A user requests environment creation (e.g., namespace, vCluster).

2. Rafay Creates a ServiceNow Ticket

A ticket is automatically generated with details like: – Environment name – Requestor – Purpose and Compliance info

3. Approval Pending

Rafay waits for the ticket to be approved in ServiceNow. A timeout is configured to auto-cancel if no response is received in time.

4. Approval Granted

An admin approves the ticket in ServiceNow. Rafay detects this and proceeds with the action.

5. Post-Provisioning Update

Once completed, Rafay updates the ticket with the outcome. Optional: send an email notification using a post-hook handler.

Step 1: Clone the Handler

  • Navigate to the Catalog in Rafay
  • Locate the ServiceNow Approval Workflow Handler
  • Clone it into the appropriate project (e.g., platform-team)

Step 2: Configure Input Variables

  • Modify the input fields to align with your ServiceNow instance
  • Extend default fields as needed, make sure they match names in the ServiceNow API

Step 3: Attach as a Pre-Hook

  • Go to Environment Templates in Rafay
  • Choose the relevant template and attach the handler as a pre-hook
  • You can configure it to trigger on every run or just once

Step 4: Monitor Approval Status

  • Rafay displays the ticket ID and approval status in the UI
  • If approved, execution continues
  • If denied/timed out: the request is canceled

Step 5: Use Project-Based Overrides

  • Share environment templates across teams
  • Each project can specify different approvers without duplicating templates

Conclusion

Rafay’s integration with ServiceNow ensures that infrastructure automation remains compliant and controlled, without slowing down developers. Whether you’re scaling clusters or creating environments, approvals are just a hook away. For teams operating in regulated environments or with strong ITSM processes, this is a game-changer.

Schedule time with us to watch a demo in action.

Author

Tags:
Approvals , Environment Manager , ServiceNow

Trusted by leading companies