How to add a banner to the PVWA
Objective
Certain deployments require explicit visual indicators to inform users about their connected instance. This clarity helps prevent unintended modifications within sandbox, testing, or production systems, while maintaining compliance awareness for restricted zones subject to mandates such as PCI or GDPR.
NOTE: In the event of technical issues, you may be required to revert these configurations.
All "show" set to 1 and all "show-text" set to 1
"show-top" 1 with rest 0 and "show-text-top" set to 1
"show-top" and "show-left" set to 1 and the rest set to 0 with only "show-text-top" set to 1
Environment
15.0 Privileged Access Manager (PAM, self-hosted) Password Vault Web Access
Procedure
The below modifications should be fully testing in QA prior to any PROD implementation attempt
1. Open the file "C:\inetpub\wwwroot\PasswordVault\v10\index.aspx" for editing.
2. Locate the following commented line:
<!-- <link rel="stylesheet" href="<%=passwordVaultStaticPath%>/assets/ui-customization-data/cyb-loading-page-customization.css" /> -->
3. Uncomment the line by deleting the <!-- opening tag and the --> closing tag.
WARNING: Do not make any other modifications or changes to index.aspx beyond this specified instruction; making additional changes could cause PVWA instability.
4. Create the directory path “C:\inetpub\wwwroot\PasswordVault\v10\assets\ui-customization-data” if it does not already exist.
5. In that directory, create a file named “cyb-loading-page-customization.css”.
6. Add the code block below into the file. Adjust any values inside “:root” to customize the color, placement, and text as needed.
NOTE: Saving these changes applies them immediately without needing an IIS restart
BANNER SETTINGS
- banner-content: Specifies the text displayed inside the banner.
- All sides will show the same text.
- banner-color: Specifies the text color inside the banner
- banner-background-color: Specifies the banner background color
- banner-font-size: Font size (specified in px to enable calculations)
- banner-height: Banner height (calculated as twice the font size by default)
- banner-font-family: Specifies the font family
BANNER VISIBILITY TOGGLES (1 = Frame visible, 0 = Frame hidden)
- show-top: Display top banner
- show-bottom: Display bottom banner
- show-left: Display left banner
- show-right: Display right banner
TEXT DISPLAY TOGGLES (1 = Display text, 0 = Hide text) Note: Banner side must be visible to display text
- show-text-top: Display text in top banner if enabled
- show-text-bottom: Display text in bottom banner if enabled
- show-text-left: Display text in left banner if enabled
- show-text-right: Display text in right banner if enabled
:root {
/* ========================================================
BANNER SETTINGS
======================================================== */
--banner-content: "Development";
--banner-color: white;
--banner-background-color: green;
--banner-font-size: 14px;
--banner-height: calc(var(--banner-font-size) * 2);
--banner-font-family: "Open Sans", sans-serif;
/* ========================================================
BANNER VISIBILITY TOGGLES (1 = Frame visible, 0 = Frame hidden)
======================================================== */
--show-top: 1;
--show-bottom: 1;
--show-left: 1;
--show-right: 1;
/* ========================================================
TEXT DISPLAY TOGGLES (1 = Show text, 0 = Hide text)
======================================================== */
--show-text-top: 1;
--show-text-bottom: 1;
--show-text-left: 1;
--show-text-right: 1;
}
/* 1. Universal Layout Constraints for the App Containers */
shell-app, pv-app {
display: block;
position: absolute !important;
/* Each direction responds directly to its own explicit toggle */
top: calc(var(--banner-height) * var(--show-top)) !important;
bottom: calc(var(--banner-height) * var(--show-bottom)) !important;
left: calc(var(--banner-height) * var(--show-left)) !important;
right: calc(var(--banner-height) * var(--show-right)) !important;
width: calc(100vw - calc(var(--banner-height) * var(--show-left)) - calc(var(--banner-height) * var(--show-right))) !important;
height: calc(100vh - calc(var(--banner-height) * var(--show-top)) - calc(var(--banner-height) * var(--show-bottom))) !important;
transform: translateZ(0) !important;
box-sizing: border-box !important;
}
/* 2. Paint Left and Right Color Blocks Independently on the Body */
body {
margin: 0;
padding: 0;
box-sizing: border-box;
background-attachment: fixed;
background-image:
linear-gradient(
90deg,
var(--banner-background-color) 0px,
var(--banner-background-color) calc(var(--banner-height) * var(--show-left)),
transparent calc(var(--banner-height) * var(--show-left)),
transparent calc(100vw - calc(var(--banner-height) * var(--show-right))),
var(--banner-background-color) calc(100vw - calc(var(--banner-height) * var(--show-right)))
);
}
/* 3. Base Horizontal Banners Setup */
body::before,
body::after {
content: var(--banner-content);
display: flex;
align-items: center;
justify-content: center;
position: fixed;
left: 0;
width: 100%;
height: var(--banner-height);
background-color: var(--banner-background-color);
font-family: var(--banner-font-family);
font-weight: bolder;
font-size: var(--banner-font-size);
z-index: 999999;
box-sizing: border-box;
/* Corporate safeguards: prevents text blocking UI clicks or data selection */
pointer-events: none;
user-select: none !important;
-webkit-user-select: none !important;
}
/* TOP BANNER */
body::before {
top: 0;
opacity: var(--show-top);
color: RGB(from var(--banner-color) r g b / calc(var(--show-text-top) * 100%));
}
/* BOTTOM BANNER */
body::after {
bottom: 0;
opacity: var(--show-bottom);
color: RGB(from var(--banner-color) r g b / calc(var(--show-text-bottom) * 100%));
}
/* 4. Text-Only Side Elements Setup */
shell-app::before, pv-app::before,
shell-app::after, pv-app::after {
content: var(--banner-content);
display: flex;
align-items: center;
justify-content: center;
position: fixed;
top: 0;
width: 100vh;
height: var(--banner-height);
font-family: var(--banner-font-family);
font-weight: bolder;
font-size: var(--banner-font-size);
z-index: 999998;
white-space: nowrap;
/* Corporate safeguards */
pointer-events: none;
user-select: none !important;
-webkit-user-select: none !important;
}
/* LEFT SIDE BANNER TEXT */
shell-app::before, pv-app::before {
left: calc(var(--banner-height) * var(--show-left) * -1) !important;
transform: rotate(-90deg) translateX(-100%);
transform-origin: top left;
opacity: var(--show-left);
color: RGB(from var(--banner-color) r g b / calc(var(--show-text-left) * 100%));
}
/* RIGHT SIDE BANNER TEXT */
shell-app::after, pv-app::after {
right: calc(var(--banner-height) * var(--show-right) * -1) !important;
transform: rotate(90deg) translateX(100%);
transform-origin: top right;
opacity: var(--show-right);
color: RGB(from var(--banner-color) r g b / calc(var(--show-text-right) * 100%));
}