How imjaineel/on-demand-admin-access works
Project type and purpose
• This is a ServiceNow custom application (“On-Demand-Admin-Access”) packaged as update‐sets and authoring XML files.
• It provides a UI (Service Catalog + Forms) for requesting temporary administrative access, enforces UI policies, triggers Flow Designer flows, grants roles, enforces ACLs, and sends email notifications.
File structure
• Top-level:
• README.md, LICENSE, sn_source_control.properties, checksum.txt
• dictionary/ – custom table definitions (x_snc_admin_temporary_access.xml)
• author_elective_update/ – initial app metadata (sys_app, sys_module, UI Policies, catalog items, table definitions, flows)
• update/ – incremental metadata changes (client scripts, catalog UI policies & actions, item options, questions, script includes, flows, ACLs, email actions, UI form sections)
• Key patterns:
• MVC-style low-code: tables (Model), UI Policies/Forms/Catalog Items (View), Script Includes/Flows (Controller)
• Flow Designer (sys_hub_flow_*.xml) for orchestration
• ACLs & Roles for security
• Email action triggers for notifications
README
• Confirms purpose: on‐demand temporary admin access in ServiceNow.
a. Main components
• ServiceNow Platform (hosted instance)
• Custom Application “On-Demand-Admin-Access”
– Data Layer: x_snc_admin_temporary_access table & related dictionary entries
– UI Layer:
· Service Catalog Item (request form)
· Record producer/form sections & client scripts
· UI Policies & UI Policy Actions
– Orchestration Layer: Flow Designer flows (sys_hub_flow_*) & Hub Action Type Definitions
– Business Logic Layer: Script Includes (sys_script_include_*)
– Security Layer: Roles (sys_user_role_*), ACLs (sys_security_acl_*), Scope Privileges
– Notification Layer: Email Actions (sysevent_email_action_*)
• External Services
– Email server (SMTP)
– (Optional) Update‐set import/export via source control
b. Relationships & interactions
1. User → ServiceNow UI (Catalog request)
2. UI Policies & Client Scripts validate/modify form inputs
3. Upon submission, Flow Designer flow is triggered
4. Flow calls Script Includes to create a temporary grant record in x_snc_admin_temporary_access
5. Flow assigns a temporary role to the user, records start/end times
6. ACLs enforce access control on the record and on admin functionality
7. Email Action fires to notify approvers and the requester
8. At end time, a scheduled flow revokes the role
c. Architectural patterns & design principles
• Low-code MVC on ServiceNow
• Event-driven flows for orchestration
• Fine-grained ACLs for data security
• Separation of concerns: UI policies (view rules), Business logic in Flows & Script Includes (controllers), Data definitions in Dictionary (models)
d. Key technologies & frameworks
• ServiceNow Platform scoped application
• Service Catalog & Record Producers
• Flow Designer & Hub Actions
• UI Policies & Client Scripts (JavaScript)
• Script Includes (server-side JavaScript)
• ACLs & Role-based access control
• Email Notifications via ServiceNow mail API