Splunk Dev

AppInspect - check_web_conf_expose_patterns_have_restmap_matches for EAI (Extensible Administration Interface)

anonymousStuden
Engager

My endpoint works perfectly fine and returned responses that I expect. However, when I ran my app through app inspect, I received the following:

FAILURE: web.conf found with a `pattern` exposed that does not
correspond to any `match` stanza in restmap.conf. Apps should only
expose endpoints that they define. Pattern: `/apiDomain/`. Please
remove or edit this stanza: [expose:apiDomain]. File:
default/web.conf Line Number: 3


My restmap.conf is as follows:

[admin:apiDomain]
match = /apiDomain
members = APIDomainHandler

[admin_external:APIDomainHandler]
handlertype = python
python.version = python3
handlerfile = APIDomainHandler.py
handleractions = list
handlerpersistentmode = true

And my web.conf is as follows:

[expose:apiDomain]
methods = GET
pattern = apiDomain

[expose:apiDomain_elements]
methods = GET
pattern = /apiDomain/*


default/web.conf Line Number: 3 is the pattern = apiDomain

I'm not sure what I'm missing here 
Labels (2)
0 Karma
1 Solution

anonymousStuden
Engager

Turns out I just needed to change my pattern from apiDomain to apiDomain/**, and the apiDomain_elements stanza is not needed.

View solution in original post

0 Karma

anonymousStuden
Engager

Turns out I just needed to change my pattern from apiDomain to apiDomain/**, and the apiDomain_elements stanza is not needed.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...