Switched remaining files to Apache license.
[shibboleth/sp.git] / shib-target / shibrpc.x
1 /*
2  *  Copyright 2001-2005 Internet2
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /*
18  * shib_rpc.x: generic shib RPC definitions for target communication
19  *
20  * Created By:  Derek Atkins <derek@ihtfp.com>
21  *
22  * $Id$
23  */
24
25 #ifdef RPC_XDR
26 %
27 %/* sometimes xdr_enum_t is not defined properly */
28 %#ifndef xdr_enum_t
29 %#define xdr_enum_t xdr_enum
30 %#endif
31 %
32 #endif
33
34 /* function argument and response structures */
35
36 struct shibrpc_new_session_args_2 {
37   int           supported_profiles;                     /* bitmask of supported profiles */
38   string        application_id<>;
39   string        packet<>;                                       /* profile input packet from client */
40   string        recipient<>;                            /* endpoint that received packet */
41   string        client_addr<>;
42 };
43
44 struct shibrpc_new_session_ret_2 {
45   string        status<>;                                       /* empty string or a SAMLException */
46   string        target<>;                                       /* profile-specific state token from client */
47   string        cookie<>;                                       /* session key manufactured for client */
48   string        provider_id<>;                          /* authenticating IdP */
49 };
50
51 struct shibrpc_get_session_args_2 {
52   string                application_id<>;
53   string                cookie<>;                               /* session key provided by client */
54   string                client_addr<>;
55 };
56
57 struct shibrpc_get_session_ret_2 {
58   string                status<>;                               /* empty string or a SAMLException */
59   int                   profile;                                /* profile used in creating session */
60   string                provider_id<>;                  /* authenticating IdP */
61   string                auth_statement<>;               /* SAML authn statement */
62   string                attr_response_pre<>;    /* SAML attr assertions as received */
63   string                attr_response_post<>;   /* SAML attr assertions post-filtering */
64 };
65
66 struct shibrpc_end_session_args_2 {
67   string                cookie<>;                               /* session key provided by client */
68 };
69
70 struct shibrpc_end_session_ret_2 {
71   string                status<>;                               /* empty string or a SAMLException */
72 };
73
74
75 /* Define the Shib Target RPC interface */
76 program SHIBRPC_PROG {
77   version SHIBRPC_VERS_2 {
78
79     /* Ping the rpcsvc to make sure it is alive. */
80     int shibrpc_ping (int) = 0;
81
82     /* Session Cache Remoting RPCs */
83
84     /* Create a new session for this user (SAML Browser Profile Consumer) */
85     shibrpc_new_session_ret_2 shibrpc_new_session (shibrpc_new_session_args_2) = 1;
86
87     /* Validate and access data associated with existing session */
88     shibrpc_get_session_ret_2 shibrpc_get_session (shibrpc_get_session_args_2) = 2;
89     
90     /* End a session */
91     shibrpc_end_session_ret_2 shibrpc_end_session (shibrpc_end_session_args_2) = 3;
92
93   } = 2;
94 } = 123456;                     /* Arbitrary RPC Program Number */