Splunk Dev

Splunk app inpsect - Customizing splunk login screen

sanjai
Explorer

Hi Splunkers,

I'm currently working on customizing the Splunk login screen to change the logo, background, footer, etc. I referred to the Splunk documentation (https://docs.splunk.com/Documentation/Splunk/9.1.3/AdvancedDev/CustomizeLogin) and successfully completed the customization. Now, the Splunk login screen displays my logo, background image, and footer content.

However, I encountered an issue when running Splunk App Inspect on the custom-login app I created. The Splunk App Inspect tool reported 8 failures:

  1. The web.conf file contains a [settings] stanza, which is not permitted. Only [endpoint:] and [expose:] stanzas are allowed in web.conf. Line Number: 1
  2. The 'local' directory exists, which is not allowed. All configuration should be in the 'default' directory.
  3. The 'local.meta' file exists, which is not permitted. All metadata permissions should be set in 'default.meta'.
  4. No README file was found, which should include version support, system requirements, installation, configuration, troubleshooting, and running of the app, or a link to online documentation.

I'm wondering if the [endpoint:*] and [expose:*] stanzas in web.conf are necessary for customizing the login screen. Are these stanzas required for login screen changes? All other issues have been fixed. (for production environment)

Below is the corrected version of the custom_login app structure based on the Splunk App Inspect recommendations:

```
custom_login
|-- default
| |-- app.conf
| |-- web.conf
| |-- restmap.conf
| |-- savedsearches.conf
| |-- ui_prefs.conf
| |-- README
| |-- data
|-- metadata
| |-- default.meta
|-- static
| |-- appIcon.png
| |-- appIcon_2x.png
| |-- appIconAlt.png
| |-- appIconAlt_2x.png
| |-- background.png
| |-- fav_logo.png
|-- bin
| |-- readme.txt
|-- appserver
| |-- static
| |-- background.png
| |-- fav_logo.png
```

Here are the contents of the configuration files:

**app.conf**
```
[launcher]
author = NAME
description = <<<<<XXXXXXXXYYYYYY>>>>>>.
version = Custom login 1.0

[install]
is_configured = 0

[ui]
is_visible = 1
label = Custom app login

[triggers]
reload.web = web.conf
reload.restmap = restmap.conf
reload.ui_prefs = ui_prefs.conf
```

**restmap.conf**
```
# restmap.conf for custom_login

[endpoint:login_background]
# REST endpoint for login background image configurations
match = /custom_login
```

**ui_prefs.conf**
```
[settings]
loginBackgroundImageOption = custom
loginCustomBackgroundImage = custom_login:appserver/static/background.png
login_content = This is a server managed by my team. For any inquiries, please reach out to us at YYYY.com
loginCustomLogo = custom_login:appserver/static/fav_logo.png
loginFooterOption = custom
loginFooterText = © 2024 XXXXXXX
```

**web.conf**
```
[endpoint:login]
[expose:login_background]
pattern = /custom_login
methods = GET
```

I am currently working in a development environment. Any advice on how to proceed with these changes would be appreciated.

Thanks in advance.

Labels (3)
Tags (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

What is the goal/target of the app?  If it's for internal use then you can ignore the failures.  If it's for Splunk Cloud then you must resolve the web.conf error.  Splunk Support may be able to help you with that, but be prepared for them to say what you want to do is not possible.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

What is the goal/target of the app?  If it's for internal use then you can ignore the failures.  If it's for Splunk Cloud then you must resolve the web.conf error.  Splunk Support may be able to help you with that, but be prepared for them to say what you want to do is not possible.

---
If this reply helps you, Karma would be appreciated.

sanjai
Explorer

Yes, I'm customizing the login screen for Splunk Enterprise, not for Splunk Cloud. I'm ignoring these failures. Thanks. @richgalloway 

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...