This file is indexed.

/usr/include/shibsp/Application.h is in libshibsp-dev 2.5.2+dfsg-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
/**
 * Licensed to the University Corporation for Advanced Internet
 * Development, Inc. (UCAID) under one or more contributor license
 * agreements. See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership.
 *
 * UCAID licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the
 * License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific
 * language governing permissions and limitations under the License.
 */

/**
 * @file shibsp/Application.h
 *
 * Interface to a Shibboleth Application instance.
 */

#ifndef __shibsp_app_h__
#define __shibsp_app_h__

#include <shibsp/util/PropertySet.h>

#include <string>
#include <vector>
#ifndef SHIBSP_LITE
# include <saml/binding/MessageEncoder.h>
#endif

namespace xmltooling {
    class XMLTOOL_API CredentialResolver;
    class XMLTOOL_API GenericRequest;
    class XMLTOOL_API RWLock;
    class XMLTOOL_API SOAPTransport;
    class XMLTOOL_API StorageService;
    class XMLTOOL_API TrustEngine;
};

#ifndef SHIBSP_LITE
namespace opensaml {
    class SAML_API SecurityPolicyRule;
    namespace saml2md {
        class SAML_API MetadataProvider;
    };
};
#endif

namespace shibsp {

#ifndef SHIBSP_LITE
    class SHIBSP_API AttributeExtractor;
    class SHIBSP_API AttributeFilter;
    class SHIBSP_API AttributeResolver;
#endif
    class SHIBSP_API Attribute;
    class SHIBSP_API Handler;
    class SHIBSP_API ServiceProvider;
    class SHIBSP_API SessionInitiator;
    class SHIBSP_API SPRequest;

#if defined (_MSC_VER)
    #pragma warning( push )
    #pragma warning( disable : 4251 )
#endif

    /**
     * Interface to a Shibboleth Application instance.
     *
     * <p>An Application is a logical set of resources that act as a unit
     * of session management and policy.
     */
    class SHIBSP_API Application : public virtual PropertySet
#ifndef SHIBSP_LITE
        ,public virtual opensaml::MessageEncoder::ArtifactGenerator
#endif
    {
        MAKE_NONCOPYABLE(Application);
    protected:
        /**
         * Constructor.
         *
         * @param sp    parent ServiceProvider instance
         */
        Application(const ServiceProvider* sp);

        /** Pointer to parent SP instance. */
        const ServiceProvider* m_sp;

        /** Shared lock for manipulating application state. */
        mutable xmltooling::RWLock* m_lock;

        /** Pairs of raw and normalized CGI header names to clear. */
        mutable std::vector< std::pair<std::string,std::string> > m_unsetHeaders;

    public:
        virtual ~Application();

        /**
         * Returns the owning ServiceProvider instance.
         *
         * @return a locked ServiceProvider
         */
        const ServiceProvider& getServiceProvider() const;

        /**
         * Returns the Application's ID.
         *
         * @return  the ID
         */
        virtual const char* getId() const;

        /**
         * Returns a unique hash for the Application.
         *
         * @return a value resulting from a computation over the Application's configuration
         */
        virtual const char* getHash() const=0;

        /**
         * Returns the name and cookie properties to use for this Application.
         *
         * @param prefix    a value to prepend to the base cookie name
         * @param lifetime  if non-null, will be populated with a suggested lifetime for the cookie, or 0 if session-bound
         * @return  a pair containing the cookie name and the string to append to the cookie value
         */
        virtual std::pair<std::string,const char*> getCookieNameProps(const char* prefix, time_t* lifetime=nullptr) const;

#ifndef SHIBSP_LITE
        /**
         * Returns a MetadataProvider for use with this Application.
         *
         * @param required  true iff an exception should be thrown if no MetadataProvider is available
         * @return  a MetadataProvider instance, or nullptr
         */
        virtual opensaml::saml2md::MetadataProvider* getMetadataProvider(bool required=true) const=0;

        /**
         * Returns a TrustEngine for use with this Application.
         *
         * @param required  true iff an exception should be thrown if no TrustEngine is available
         * @return  a TrustEngine instance, or nullptr
         */
        virtual xmltooling::TrustEngine* getTrustEngine(bool required=true) const=0;

        /**
         * Returns an AttributeExtractor for use with this Application.
         *
         * @return  an AttributeExtractor, or nullptr
         */
        virtual AttributeExtractor* getAttributeExtractor() const=0;

        /**
         * Returns an AttributeFilter for use with this Application.
         *
         * @return  an AttributeFilter, or nullptr
         */
        virtual AttributeFilter* getAttributeFilter() const=0;

        /**
         * Returns an AttributeResolver for use with this Application.
         *
         * @return  an AttributeResolver, or nullptr
         */
        virtual AttributeResolver* getAttributeResolver() const=0;

        /**
         * Returns the CredentialResolver instance associated with this Application.
         *
         * @return  a CredentialResolver, or nullptr
         */
        virtual xmltooling::CredentialResolver* getCredentialResolver() const=0;

        /**
         * Returns configuration properties governing security interactions with a peer.
         *
         * @param provider  a peer entity's metadata
         * @return  the applicable PropertySet
         */
        virtual const PropertySet* getRelyingParty(const opensaml::saml2md::EntityDescriptor* provider) const=0;

        /**
         * Returns configuration properties governing security interactions with a named peer.
         *
         * @param entityID  a peer name
         * @return  the applicable PropertySet
         */
        virtual const PropertySet* getRelyingParty(const XMLCh* entityID) const=0;

        /**
         * @deprecated
         * Returns any additional audience values associated with this Application.
         *
         * @return additional audience values associated with the Application, or nullptr
         */
        virtual const std::vector<const XMLCh*>* getAudiences() const=0;
#endif

        /**
         * Returns the designated notification URL, or an empty string if no more locations are specified.
         *
         * @param request   requested URL to use to fill in missing pieces of notification URL
         * @param front     true iff front channel notification is desired, false iff back channel is desired
         * @param index     zero-based index of URL to return
         * @return  the designated URL, or an empty string
         */
        virtual std::string getNotificationURL(const char* request, bool front, unsigned int index) const=0;

        /**
         * Returns an array of attribute IDs to use as a REMOTE_USER value, in order of preference.
         *
         * @return  an array of attribute IDs, possibly empty
         */
        virtual const std::vector<std::string>& getRemoteUserAttributeIds() const=0;

        /**
         * Ensures no value exists for a request header, allowing for application-specific customization.
         *
         * @param request  SP request to modify
         * @param rawname  raw name of header to clear
         * @param cginame  CGI-equivalent name of header, <strong>MUST</strong> begin with "HTTP_".
         */
        virtual void clearHeader(SPRequest& request, const char* rawname, const char* cginame) const;

        /**
         * Sets a value for a request header allowing for application-specific customization.
         *
         * @param request   SP request to modify
         * @param name      name of header to set
         * @param value     value to set
         */
        virtual void setHeader(SPRequest& request, const char* name, const char* value) const;

        /**
         * Returns a non-spoofable request header value allowing for application-specific customization.
         *
         * @param request   SP request to access
         * @param name      the name of the secure header to return
         * @return  the header's value, or an empty string
         */
        virtual std::string getSecureHeader(const SPRequest& request, const char* name) const;

        /**
         * Clears any headers that may be used to hold attributes after export.
         *
         * @param request   SP request to clear
         */
        virtual void clearAttributeHeaders(SPRequest& request) const;

        /**
         * Returns the default SessionInitiator when automatically requesting a session.
         *
         * @return the default SessionInitiator, or nullptr
         */
        virtual const SessionInitiator* getDefaultSessionInitiator() const=0;

        /**
         * Returns a SessionInitiator with a particular ID when automatically requesting a session.
         *
         * @param id    an identifier unique to the Application
         * @return the designated SessionInitiator, or nullptr
         */
        virtual const SessionInitiator* getSessionInitiatorById(const char* id) const=0;

        /**
         * Returns the default AssertionConsumerService Handler
         * for use in AuthnRequest messages.
         *
         * @return the default AssertionConsumerService, or nullptr
         */
        virtual const Handler* getDefaultAssertionConsumerService() const=0;

        /**
         * Returns an AssertionConsumerService Handler with a particular index
         * for use in AuthnRequest messages.
         *
         * @param index an index unique to an application
         * @return the designated AssertionConsumerService, or nullptr
         */
        virtual const Handler* getAssertionConsumerServiceByIndex(unsigned short index) const=0;

        /**
         * Returns an AssertionConsumerService Handler that supports
         * a particular protocol "family" and optional binding.
         *
         * @param protocol  a protocol identifier
         * @param binding   a binding identifier
         * @return a matching AssertionConsumerService, or nullptr
         */
        virtual const Handler* getAssertionConsumerServiceByProtocol(const XMLCh* protocol, const char* binding=nullptr) const;

        /**
         * @deprecated
         * Returns one or more AssertionConsumerService Handlers that support
         * a particular protocol binding.
         *
         * @param binding   a protocol binding identifier
         * @return a set of qualifying AssertionConsumerServices
         */
        virtual const std::vector<const Handler*>& getAssertionConsumerServicesByBinding(const XMLCh* binding) const=0;

        /**
         * Returns the Handler associated with a particular path/location.
         *
         * @param path  the PATH_INFO appended to the end of a base Handler location
         *              that invokes the Handler
         * @return the mapped Handler, or nullptr
         */
        virtual const Handler* getHandler(const char* path) const=0;

        /**
         * Returns all registered Handlers.
         *
         * @param handlers  array to populate
         */
        virtual void getHandlers(std::vector<const Handler*>& handlers) const=0;

        /**
         * Checks a proposed redirect URL against application-specific settings for legal redirects,
         * such as same-host restrictions or whitelisted domains, and raises a SecurityPolicyException
         * in the event of a violation.
         *
         * @param request   the request leading to the redirect
         * @param url       an absolute URL to validate
         */
        virtual void limitRedirect(const xmltooling::GenericRequest& request, const char* url) const;
    };

#if defined (_MSC_VER)
    #pragma warning( pop )
#endif

};

#endif /* __shibsp_app_h__ */