Browse Source

First commit

tags/pkg/dev/eole-2.6.2/0.0.1-0
Philippe Caseiro 1 year ago
commit
6157549fcd
100 changed files with 6380 additions and 0 deletions
  1. 231
    0
      LICENSE
  2. 27
    0
      Makefile
  3. 4
    0
      README.md
  4. 64
    0
      apps.mk
  5. 16
    0
      creolefuncs/idp.py
  6. 11
    0
      diagnose/77-idp
  7. 168
    0
      dicos/70_shibboleth_idp.xml
  8. 2
    0
      eole-idp.mk
  9. 231
    0
      eole.mk
  10. 9
    0
      postservice/99-lemonldap-ng
  11. 46
    0
      posttemplate/20-init-shib-IDP
  12. 14
    0
      preservice/00-idp
  13. 21
    0
      pretemplate/29-shib-sp-metadata
  14. 201
    0
      src/shibboleth-identity-provider-3.2.1/LICENSE.txt
  15. 4
    0
      src/shibboleth-identity-provider-3.2.1/bin/aacli.bat
  16. 9
    0
      src/shibboleth-identity-provider-3.2.1/bin/aacli.sh
  17. 113
    0
      src/shibboleth-identity-provider-3.2.1/bin/ant-jetty.xml
  18. 34
    0
      src/shibboleth-identity-provider-3.2.1/bin/ant.bat
  19. 84
    0
      src/shibboleth-identity-provider-3.2.1/bin/ant.sh
  20. 4
    0
      src/shibboleth-identity-provider-3.2.1/bin/build.bat
  21. 8
    0
      src/shibboleth-identity-provider-3.2.1/bin/build.sh
  22. 703
    0
      src/shibboleth-identity-provider-3.2.1/bin/build.xml
  23. 4
    0
      src/shibboleth-identity-provider-3.2.1/bin/install.bat
  24. 8
    0
      src/shibboleth-identity-provider-3.2.1/bin/install.sh
  25. 4
    0
      src/shibboleth-identity-provider-3.2.1/bin/keygen.bat
  26. 8
    0
      src/shibboleth-identity-provider-3.2.1/bin/keygen.sh
  27. BIN
      src/shibboleth-identity-provider-3.2.1/bin/lib/ant-1.9.4.jar
  28. BIN
      src/shibboleth-identity-provider-3.2.1/bin/lib/ant-launcher-1.9.4.jar
  29. BIN
      src/shibboleth-identity-provider-3.2.1/bin/lib/bcpkix-jdk15on-1.53.jar
  30. BIN
      src/shibboleth-identity-provider-3.2.1/bin/lib/idp-installer-3.2.1.jar
  31. BIN
      src/shibboleth-identity-provider-3.2.1/bin/lib/jcommander-1.48.jar
  32. 4
    0
      src/shibboleth-identity-provider-3.2.1/bin/reload-metadata.bat
  33. 9
    0
      src/shibboleth-identity-provider-3.2.1/bin/reload-metadata.sh
  34. 4
    0
      src/shibboleth-identity-provider-3.2.1/bin/reload-service.bat
  35. 9
    0
      src/shibboleth-identity-provider-3.2.1/bin/reload-service.sh
  36. 29
    0
      src/shibboleth-identity-provider-3.2.1/bin/runclass.bat
  37. 50
    0
      src/shibboleth-identity-provider-3.2.1/bin/runclass.sh
  38. 4
    0
      src/shibboleth-identity-provider-3.2.1/bin/seckeygen.bat
  39. 8
    0
      src/shibboleth-identity-provider-3.2.1/bin/seckeygen.sh
  40. 4
    0
      src/shibboleth-identity-provider-3.2.1/bin/status.bat
  41. 9
    0
      src/shibboleth-identity-provider-3.2.1/bin/status.sh
  42. 4
    0
      src/shibboleth-identity-provider-3.2.1/bin/version.bat
  43. 8
    0
      src/shibboleth-identity-provider-3.2.1/bin/version.sh
  44. 32
    0
      src/shibboleth-identity-provider-3.2.1/conf/access-control.xml
  45. 45
    0
      src/shibboleth-identity-provider-3.2.1/conf/attribute-filter.xml
  46. 295
    0
      src/shibboleth-identity-provider-3.2.1/conf/attribute-resolver-full.xml
  47. 97
    0
      src/shibboleth-identity-provider-3.2.1/conf/attribute-resolver-ldap.xml
  48. 95
    0
      src/shibboleth-identity-provider-3.2.1/conf/attribute-resolver.xml
  49. 103
    0
      src/shibboleth-identity-provider-3.2.1/conf/audit.xml
  50. 77
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/authn-comparison.xml
  51. 18
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/authn-events-flow.xml
  52. 62
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/external-authn-config.xml
  53. 114
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/general-authn.xml
  54. 37
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/ipaddress-authn-config.xml
  55. 27
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/jaas-authn-config.xml
  56. 11
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/jaas.config
  57. 31
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/krb5-authn-config.xml
  58. 130
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/ldap-authn-config.xml
  59. 109
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/password-authn-config.xml
  60. 67
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/remoteuser-authn-config.xml
  61. 63
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/remoteuser-internal-authn-config.xml
  62. 69
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/spnego-authn-config.xml
  63. 41
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/x509-authn-config.xml
  64. 21
    0
      src/shibboleth-identity-provider-3.2.1/conf/authn/x509-internal-authn-config.xml
  65. 44
    0
      src/shibboleth-identity-provider-3.2.1/conf/c14n/attribute-sourced-subject-c14n-config.xml
  66. 27
    0
      src/shibboleth-identity-provider-3.2.1/conf/c14n/simple-subject-c14n-config.xml
  67. 18
    0
      src/shibboleth-identity-provider-3.2.1/conf/c14n/subject-c14n-events-flow.xml
  68. 109
    0
      src/shibboleth-identity-provider-3.2.1/conf/c14n/subject-c14n.xml
  69. 37
    0
      src/shibboleth-identity-provider-3.2.1/conf/c14n/x500-subject-c14n-config.xml
  70. 53
    0
      src/shibboleth-identity-provider-3.2.1/conf/cas-protocol.xml
  71. 65
    0
      src/shibboleth-identity-provider-3.2.1/conf/credentials.xml
  72. 120
    0
      src/shibboleth-identity-provider-3.2.1/conf/errors.xml
  73. 53
    0
      src/shibboleth-identity-provider-3.2.1/conf/global.xml
  74. 194
    0
      src/shibboleth-identity-provider-3.2.1/conf/idp.properties
  75. 136
    0
      src/shibboleth-identity-provider-3.2.1/conf/intercept/consent-intercept-config.xml
  76. 42
    0
      src/shibboleth-identity-provider-3.2.1/conf/intercept/context-check-intercept-config.xml
  77. 18
    0
      src/shibboleth-identity-provider-3.2.1/conf/intercept/intercept-events-flow.xml
  78. 36
    0
      src/shibboleth-identity-provider-3.2.1/conf/intercept/profile-intercept.xml
  79. 60
    0
      src/shibboleth-identity-provider-3.2.1/conf/ldap.properties
  80. 166
    0
      src/shibboleth-identity-provider-3.2.1/conf/logback.xml
  81. 72
    0
      src/shibboleth-identity-provider-3.2.1/conf/metadata-providers.xml
  82. 23
    0
      src/shibboleth-identity-provider-3.2.1/conf/mvc-beans.xml
  83. 70
    0
      src/shibboleth-identity-provider-3.2.1/conf/relying-party.xml
  84. 35
    0
      src/shibboleth-identity-provider-3.2.1/conf/saml-nameid.properties
  85. 62
    0
      src/shibboleth-identity-provider-3.2.1/conf/saml-nameid.xml
  86. 61
    0
      src/shibboleth-identity-provider-3.2.1/conf/services.properties
  87. 145
    0
      src/shibboleth-identity-provider-3.2.1/conf/services.xml
  88. 45
    0
      src/shibboleth-identity-provider-3.2.1/conf/session-manager.xml
  89. 32
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/access-control.xml.dist
  90. 45
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/attribute-filter.xml.dist
  91. 295
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/attribute-resolver-full.xml.dist
  92. 97
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/attribute-resolver-ldap.xml.dist
  93. 95
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/attribute-resolver.xml.dist
  94. 103
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/audit.xml.dist
  95. 77
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/authn/authn-comparison.xml.dist
  96. 18
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/authn/authn-events-flow.xml.dist
  97. 62
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/authn/external-authn-config.xml.dist
  98. 114
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/authn/general-authn.xml.dist
  99. 37
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/authn/ipaddress-authn-config.xml.dist
  100. 0
    0
      src/shibboleth-identity-provider-3.2.1/dist/conf/authn/jaas-authn-config.xml.dist

+ 231
- 0
LICENSE View File

@@ -0,0 +1,231 @@
1
+GNU GENERAL PUBLIC LICENSE 
2
+Version 3, 29 June 2007
3
+Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
4
+
5
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
6
+
7
+Preamble
8
+
9
+The GNU General Public License is a free, copyleft license for software and other kinds of works.
10
+
11
+The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
12
+
13
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
14
+
15
+To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
16
+
17
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
18
+
19
+Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
20
+
21
+For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
22
+
23
+Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
24
+
25
+Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
26
+
27
+The precise terms and conditions for copying, distribution and modification follow.
28
+
29
+TERMS AND CONDITIONS
30
+
31
+0. Definitions.
32
+
33
+“This License” refers to version 3 of the GNU General Public License.
34
+
35
+“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
36
+
37
+“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
38
+
39
+To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
40
+
41
+A “covered work” means either the unmodified Program or a work based on the Program.
42
+
43
+To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
44
+
45
+To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
46
+
47
+An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
48
+
49
+1. Source Code. 
50
+The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
51
+
52
+A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
53
+
54
+The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
55
+
56
+The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
57
+
58
+The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
59
+
60
+The Corresponding Source for a work in source code form is that same work.
61
+
62
+2. Basic Permissions. 
63
+All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
64
+
65
+You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
66
+
67
+Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
68
+
69
+3. Protecting Users' Legal Rights From Anti-Circumvention Law. 
70
+No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
71
+
72
+When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
73
+
74
+4. Conveying Verbatim Copies. 
75
+You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
76
+
77
+You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
78
+
79
+5. Conveying Modified Source Versions. 
80
+You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
81
+
82
+a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
83
+
84
+b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
85
+
86
+c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
87
+
88
+d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
89
+
90
+A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
91
+
92
+6. Conveying Non-Source Forms. 
93
+You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
94
+
95
+a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
96
+
97
+b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
98
+
99
+c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
100
+
101
+d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
102
+
103
+e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
104
+
105
+A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
106
+
107
+A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
108
+
109
+“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
110
+
111
+If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
112
+
113
+The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
114
+
115
+Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
116
+
117
+7. Additional Terms. 
118
+“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
119
+
120
+When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
121
+
122
+Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
123
+
124
+a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
125
+
126
+b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
127
+
128
+c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
129
+
130
+d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
131
+
132
+e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
133
+
134
+f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
135
+
136
+All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
137
+
138
+If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
139
+
140
+Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
141
+
142
+8. Termination. 
143
+You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
144
+
145
+However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
146
+
147
+Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
148
+
149
+Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
150
+
151
+9. Acceptance Not Required for Having Copies. 
152
+You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
153
+
154
+10. Automatic Licensing of Downstream Recipients. 
155
+Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
156
+
157
+An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
158
+
159
+You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
160
+
161
+11. Patents. 
162
+A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
163
+
164
+A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
165
+
166
+Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
167
+
168
+In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
169
+
170
+If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
171
+
172
+If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
173
+
174
+A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
175
+
176
+Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
177
+
178
+12. No Surrender of Others' Freedom. 
179
+If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
180
+
181
+13. Use with the GNU Affero General Public License. 
182
+Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
183
+
184
+14. Revised Versions of this License. 
185
+The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
186
+
187
+Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
188
+
189
+If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
190
+
191
+Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
192
+
193
+15. Disclaimer of Warranty. 
194
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
195
+
196
+16. Limitation of Liability. 
197
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
198
+
199
+17. Interpretation of Sections 15 and 16. 
200
+If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
201
+
202
+END OF TERMS AND CONDITIONS
203
+
204
+How to Apply These Terms to Your New Programs
205
+
206
+If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
207
+
208
+To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
209
+
210
+<one line to give the program's name and a brief idea of what it does.> 
211
+Copyright (C) <year> <name of author>
212
+
213
+This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
214
+
215
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
216
+
217
+You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
218
+
219
+Also add information on how to contact you by electronic and paper mail.
220
+
221
+If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
222
+
223
+<program> Copyright (C) <year> <name of author> 
224
+This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 
225
+This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
226
+
227
+The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
228
+
229
+You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
230
+
231
+The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.

+ 27
- 0
Makefile View File

@@ -0,0 +1,27 @@
1
+################################
2
+# Makefile pour eole-shibboleth-idp
3
+################################
4
+
5
+SOURCE=eole-idp
6
+VERSION=3.2.1
7
+EOLE_VERSION=2.6
8
+EOLE_RELEASE=2.6.2
9
+PKGAPPS=non
10
+#FLASK_MODULE=<APPLICATION>
11
+
12
+################################
13
+# Début de zone à ne pas éditer
14
+################################
15
+
16
+include eole.mk
17
+include apps.mk
18
+
19
+################################
20
+# Fin de zone à ne pas éditer
21
+################################
22
+
23
+# Makefile rules dedicated to application
24
+# if exists
25
+ifneq (, $(strip $(wildcard $(SOURCE).mk)))
26
+include $(SOURCE).mk
27
+endif

+ 4
- 0
README.md View File

@@ -0,0 +1,4 @@
1
+# eole-lemonldap
2
+
3
+Shibboleth IDP EOLE integration
4
+

+ 64
- 0
apps.mk View File

@@ -0,0 +1,64 @@
1
+# 
2
+# NE PAS EDITER CE FICHIER
3
+#
4
+# Voir Makefile
5
+
6
+
7
+##########################
8
+# Application web envole #
9
+##########################
10
+ifneq (, $(filter oui web, $(PKGAPPS)))
11
+#
12
+# Sanity check
13
+#
14
+ifeq (, $(filter-out X.X, $(strip $(VERSION))))
15
+$(error $$(VERSION) variable has incorrect value '$(VERSION)')
16
+endif
17
+
18
+# Where to store web application files
19
+WEB_PATH				:= $(DESTDIR)/var/www/html
20
+
21
+# Envole
22
+sharenvole_PROG_DIR			:= $(DESTDIR)/usr/share/envole/$(SOURCE)
23
+
24
+src_$(SOURCE)-$(VERSION)_REC_DIR	:= $(WEB_PATH)/$(SOURCE)
25
+src_plugins-$(VERSION)_REC_DIR		:= $(WEB_PATH)/$(SOURCE)/plugin
26
+src_lang-$(VERSION)_REC_DIR		:= $(WEB_PATH)/$(SOURCE)/lang
27
+
28
+endif
29
+
30
+##########################
31
+# Application EOLE flask #
32
+##########################
33
+ifneq (, $(filter flask, $(PKGAPPS)))
34
+#
35
+# Sanity check
36
+#
37
+ifeq (, $(filter-out XXX, $(strip $(FLASK_MODULE))))
38
+$(error $$(FLASK_MODULE) variable has incorrect value '$(FLASK_MODULE)')
39
+endif
40
+
41
+ifeq (, $(strip $(wildcard src/$(FLASK_MODULE).conf)))
42
+$(error missing eoleflask configuration file 'src/$(FLASK_MODULE).conf')
43
+endif
44
+
45
+# Everything is related to mount point
46
+APPS_MOUNT_POINT	:= $(shell sed -ne 's|^"MOUNT_POINT"[[:space:]]*:[[:space:]]*"/\([^"]*\)",|\1|p' \
47
+	src/$(FLASK_MODULE).conf)
48
+
49
+ifeq (, $(strip $(APPS_MOUNT_POINT)))
50
+$(error no "MOUNT_POINT" in eoleflask configuration file 'src/$(FLASK_MODULE).conf')
51
+endif
52
+
53
+# eole-flask configuration
54
+src_DATA_DIR		:= $(DESTDIR)/etc/eole/flask/available
55
+
56
+# Where to store flask application files
57
+FLASK_PATH		:= $(eole_DIR)/flask/$(APPS_MOUNT_POINT)
58
+
59
+# static files
60
+src_$(FLASK_MODULE)_static_REC_DIR	:= $(FLASK_PATH)/static
61
+src_$(FLASK_MODULE)_templates_REC_DIR	:= $(FLASK_PATH)/templates
62
+src_$(FLASK_MODULE)_instance_REC_DIR	:= $(FLASK_PATH)/resources
63
+
64
+endif

+ 16
- 0
creolefuncs/idp.py View File

@@ -0,0 +1,16 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+def getLdapReader(encoder, passwd):
4
+    import os
5
+    try:
6
+        if os.path.isfile(passwd):
7
+            mypwdreader=open(passwd, "r").readline().rstrip()
8
+            if encoder == "":
9
+                return mypwdreader
10
+            elif encoder == "base64":
11
+                import base64
12
+                return base64.b64encode(mypwdreader)
13
+        else:
14
+            return passwd
15
+    except:
16
+        return "mot de passe inconnu"

+ 11
- 0
diagnose/77-idp View File

@@ -0,0 +1,11 @@
1
+#!/bin/bash
2
+
3
+if [ $(CreoleGet activer_idp) = "oui" ];then
4
+    . /usr/lib/eole/diagnose.sh
5
+
6
+    EchoGras "*** Shibboleth IDP"
7
+    TestHTTPPage "FIXME PLEASE" "https://www.cadoles.com/"
8
+    echo
9
+fi
10
+
11
+exit 0

+ 168
- 0
dicos/70_shibboleth_idp.xml View File

@@ -0,0 +1,168 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<creole>
3
+    <files>
4
+		<!-- System configuration -->
5
+		<file filelist='idp' name='/etc/environement' source='env-idp-shibboleth.conf' mkdir='True' rm='True'/>
6
+
7
+		<!-- Apache configuration -->
8
+		<file filelist='idp' name='/etc/apache2/ports.conf' source='apache-ports.conf' mkdir='True' rm='True'/>
9
+		<file filelist='idp' name='/etc/apache2/site-available/default-ssl.conf' source='idp-default-ssl.conf' mkdir='True' rm='True'/>
10
+		<file filelist='idp' name='/etc/apache2/site-available/idp.conf' source='apache-idp.conf' mkdir='True' rm='True'/>
11
+
12
+		<!-- Tomcat configuration -->
13
+		<file filelist='idp' name='/etc/default/tomcat8' source='tomcat8.default' mkdir='True' rm='True'/>
14
+		<file filelist='idp' name='/etc/tomcat8/catalina.properties' mkdir='True' rm='True'/>
15
+		<file filelist='idp' name='/etc/tomcat8/server.xml' mkdir='True' rm='True'/>
16
+		<file filelist='idp' name='/etc/tomcat8/context.xml' mkdir='True' rm='True'/>
17
+		<file filelist='idp' name='/etc/tomcat8/Catalina/localhost/idp.xml' mkdir='True' rm='True'/>
18
+
19
+		<!-- Shibboleth IDP configuration -->
20
+		<file filelist='idp' name='/opt/shibboleth-idp/conf/metadata-providers.xml' mkdir='True' rm='True'/>
21
+		<file filelist='idp' name='/opt/shibboleth-idp/conf/ldap.properties' mkdir='True' rm='True'/>
22
+		<file filelist='idp' name='/opt/shibboleth-idp/conf/attribute-resolver-ldap.xml' mkdir='True' rm='True'/>
23
+		<file filelist='idp' name='/opt/shibboleth-idp/conf/logback.xml' mkdir='True' rm='True'/>
24
+		<file filelist='idp' name='/opt/shibboleth-idp/conf/relying-party.xml' mkdir='True' rm='True'/>
25
+		<file filelist='idp' name='/opt/shibboleth-idp/system/views/logout/propagate.vm' mkdir='True' rm='True'/>
26
+		<file filelist='idp' name='/opt/shibboleth-idp/views/error.vm' mkdir='True' rm='True'/>
27
+		<file filelist='idp' name='/opt/shibboleth-idp/views/logout.vm' mkdir='True' rm='True'/>
28
+
29
+		<service service_list="svIdp">apache2</service>
30
+		<service service_list="svIdp">tomcat8</service>
31
+		<service service_list='svIdpDisab' method='apache'>000-default</service>
32
+		<service service_list='svIdp' method='apache'>default-ssl</service>
33
+		<service service_list='svIdp' method='apache'>idp</service>
34
+
35
+
36
+		<service_access service='apache2'>
37
+			<port service_accesslist="saidp">80</port>
38
+			<port service_accesslist="saidp">443</port>
39
+		</service_access>
40
+
41
+		<package>default-jdk</package>
42
+		<package>ca-certificates</package>
43
+		<package>openssl</package>
44
+		<package>tomcat8</package>
45
+		<package>apache2</package>
46
+	</files>
47
+	<variables>
48
+		<family name='Services'>
49
+			<variable name='activer_idp' type='oui/non' description="Activer le service Shibboleth IDP">
50
+				<value>oui</value>
51
+			</variable>
52
+		</family>
53
+		<family name="Identity provider">
54
+			<variable name='activer_nginx_web' redefine='True' hidden='True' remove_condition='True'>
55
+				<value>non</value>
56
+			</variable>
57
+
58
+			<variable name='shibbolethIDPSrc' type='string' description='IDP Source location' mode='expert' hbidden='True'>
59
+				<value>/usr/local/src/shibboleth-identity-provider-3.2.1</value>
60
+			</variable>
61
+			<variable name='ajpPort' type='number' description='AJP Proxy port' mode='expert'>
62
+				<value>8009</value>
63
+			</variable>
64
+			<variable name='javaHome' type='string' description='Java VM home directory' mode='expert'>
65
+				<value>/usr/lib/jvm/java-8-openjdk-amd64/jre</value>
66
+			</variable>
67
+			<variable name='javaHeapSize' type='number' description='Mémoire minimum pour le processus Java (Mo)' mode='expert'>
68
+				<value>128</value>
69
+			</variable>
70
+			<variable name='javaHeapMaxSize' type='number' description='Mémoire maximum pour le processus Java (Mo)' mode='expert'>
71
+				<value>2048</value>
72
+			</variable>
73
+
74
+			<variable name='speedUpTomcat' type='oui/non' description='Accèlérer le démarrage de Tomcat'>
75
+				<value>oui</value>
76
+			</variable>
77
+
78
+			<variable name='serviceProvider' type='string' description='ID du fournisseur de service' multi='True'/>
79
+			<variable name='spType' type='string' description='Type de fournisseur de service'/>
80
+			<variable name='spMetadataDownload' type='oui' description='Télécharger les métadata du fournisseur'>
81
+				<value>oui</value>
82
+			</variable>
83
+			<variable name='spMetadataFile' type='string' description='Fichier de metadata du fournisseur'/>
84
+			<variable name='spMetadataURL' type='string' description='URL de téléchargement du fichier de metadata du fournisseur'/>
85
+
86
+			<variable name='ldapProto' type='string' description="Protocole"/>
87
+			<variable name='ldapAddr' type='string' description="Adresse du serveur LDAP"/>
88
+			<variable name='ldapPort' type='number' description="Port du serveur LDAP"/>
89
+			<variable name='ldapBaseDN' type='string' description="DN de base de l'annuaire"/>
90
+			<variable name='ldapUserFilter' type='string' description="Filtre utilisateurs">
91
+				<value>(mail={user})</value>
92
+			</variable>
93
+			<variable name='ldapReaderBindDN' type='string' description="DN de l'utilisateur lecteur de l'annuaire"/>
94
+			<variable name='ldapReaderPassword' type='string' description="Mot de passe ou fichier de mot de passe de l'utilisateur lecteur de l'annuaire">
95
+				<value>/root/.reader</value>
96
+			</variable>
97
+
98
+			<variable name="defineLDAPAttr" type='oui/non' description="Definir des attributs de fédération" mode='expert'>
99
+				<value>non</value>
100
+			</variable>
101
+
102
+		</family>
103
+		<family name="Attributs de fédération" mode='expert'>
104
+			<variable name="attrID" type='string' description="Identifiant de l'attribut" multi='True'/>
105
+			<variable name="attrType" type='string' description="Type de l'attribut"/>
106
+			<variable name="attrSource" type='string' description="Source de l'attribut"/>
107
+			<variable name="attrOID" type='string' description="OID de l'attribut"/>
108
+			<variable name="attrEncoding" type='string' description="Attribut encodé ?"/>
109
+		</family>
110
+		<separators>
111
+			<separator name="managerWebName">Configuration DNS</separator>
112
+			<separator name="serviceProvider">Fournisseurs de services</separator>
113
+			<separator name="ldapProto">Serveur LDAP</separator>
114
+		</separators>
115
+	</variables>
116
+	<constraints>
117
+		<condition name='disabled_if_in' source='activer_idp'>
118
+			<param>non</param>
119
+			<target type='filelist'>idp</target>
120
+			<target type='family'>Identity provider</target>
121
+			<target type='service_accesslist'>saidp</target>
122
+			<target type='servicelist'>svIdp</target>
123
+		</condition>
124
+		<condition name='disabled_if_in' source='activer_idp'>
125
+			<param>oui</param>
126
+			<target type='servicelist'>svIdpDisab</target>
127
+		</condition>
128
+		<condition name='disabled_if_in' source='spMetadataDownload'>
129
+			<param>non</param>
130
+			<target type='variable'>spMetadataURL</target>
131
+		</condition>
132
+		<condition name='disabled_if_in' source='spMetadataDownload'>
133
+			<param>oui</param>
134
+			<target type='variable'>spMetadataFile</target>
135
+		</condition>
136
+		<condition name='disabled_if_in' source='defineLDAPAttr'>
137
+			<param>non</param>
138
+			<target type='family'>Attributs de fédération</target>
139
+		</condition>
140
+		<group master='serviceProvider'>
141
+			<slave>spType</slave>
142
+			<slave>spMetadataFile</slave>
143
+			<slave>spMetadataUrl</slave>
144
+		</group>
145
+		<group master="attrID">
146
+			<slave>attrType</slave>
147
+			<slave>attrSource</slave>
148
+			<slave>attrOID</slave>
149
+			<slave>attrEncoding</slave>
150
+		</group>
151
+		<check name="valid_enum" target="attrType">
152
+			<param>['', 'Simple', 'Prescoped']</param>
153
+        </check>
154
+		<check name="valid_enum" target="attrEncoding">
155
+			<param>['false,'true']</param>
156
+        </check>
157
+		<check name="valid_enum" target="ldapProto">
158
+			<param>['ldaps','ldap']</param>
159
+        </check>
160
+		<fill name='concat' target='managerWebName'>
161
+  			<param>manager.</param>
162
+  			<param type='eole'>nom_domaine_local</param>
163
+		</fill>
164
+	</constraints>
165
+	<help>
166
+		<variable name='activeridp'>Activer l'hébergement d'une place de marché HTTP pour OpenNebula</variable>
167
+	</help>
168
+</creole>

+ 2
- 0
eole-idp.mk View File

@@ -0,0 +1,2 @@
1
+creolefuncs_DATA_DIR := $(DESTDIR)/usr/share/creole/funcs
2
+src_REC_DIR := $(DESTDIR)/usr/local/src

+ 231
- 0
eole.mk View File

@@ -0,0 +1,231 @@
1
+#
2
+# NE PAS EDITER CE FICHIER
3
+#
4
+# Utiliser <appli>.mk à inclure à la fin de Makefile
5
+
6
+#################
7
+# Sanity checks #
8
+#################
9
+
10
+ifeq (, $(DESTDIR))
11
+$(warning $$(DESTDIR) is empty, installation will be done in /)
12
+endif
13
+
14
+ifeq (, $(filter-out XXX-XXX, $(strip $(SOURCE))))
15
+$(error $$(SOURCE) variable has incorrect value '$(SOURCE)')
16
+endif
17
+
18
+ifeq (, $(filter-out 2.X, $(strip $(EOLE_VERSION))))
19
+$(error $$(EOLE_VERSION) variable has incorrect value '$(EOLE_VERSION)')
20
+endif
21
+
22
+ifeq (, $(filter-out 2.X.Y, $(strip $(EOLE_RELEASE))))
23
+$(error $$(EOLE_RELEASE) variable has incorrect value '$(EOLE_RELEASE)')
24
+endif
25
+
26
+#########################
27
+# Variables definitions #
28
+#########################
29
+
30
+INSTALL                 := install
31
+INSTALL_DATA            := install -m 644
32
+INSTALL_PROGRAM         := install -m 755
33
+INSTALL_DIRECTORY       := install -m 755 -d
34
+INSTALL_RECURSIVE       := cp -dr --no-preserve=ownership
35
+
36
+# Standard path
37
+bin_PROG_DIR		:= $(DESTDIR)/usr/bin
38
+sbin_PROG_DIR		:= $(DESTDIR)/usr/sbin
39
+man8_DATA_DIR		:= $(DESTDIR)/usr/share/man/fr.UTF-8/man8
40
+
41
+# Base
42
+eole_DIR                := $(DESTDIR)/usr/share/eole
43
+
44
+ifeq ($(strip $(EOLE_VERSION)), 2.3)
45
+diagnose_PROG_DIR       := $(eole_DIR)/diagnose/module
46
+else
47
+diagnose_PROG_DIR       := $(eole_DIR)/diagnose/
48
+endif
49
+
50
+# Creole
51
+creole_DIR              := $(eole_DIR)/creole
52
+dicos_DATA_DIR          := $(creole_DIR)/dicos
53
+tmpl_DATA_DIR           := $(creole_DIR)/distrib
54
+preservice_PROG_DIR     := $(eole_DIR)/preservice
55
+pretemplate_PROG_DIR    := $(eole_DIR)/pretemplate
56
+posttemplate_PROG_DIR   := $(eole_DIR)/posttemplate
57
+postservice_PROG_DIR    := $(eole_DIR)/postservice
58
+ifeq ($(strip $(EOLE_VERSION)), 2.3)
59
+firewall_DATA_DIR       := $(eole_DIR)/firewall
60
+endif
61
+bacula_restore_DATA_DIR := $(eole_DIR)/bacula/restore
62
+bareos_restore_DATA_DIR := $(eole_DIR)/bareos/restore
63
+bacula_fichier_DATA_DIR := $(DESTDIR)/etc/bacula/baculafichiers.d
64
+bareos_fichier_DATA_DIR	:= $(DESTDIR)/etc/bareos/bareosfichiers.d
65
+ifeq ($(strip $(EOLE_VERSION)), 2.3)
66
+schedule_pre_PROG_DIR   := $(eole_DIR)/schedule/pre
67
+schedule_post_PROG_DIR  := $(eole_DIR)/schedule/post
68
+else
69
+schedule_scripts_PROG_DIR	:= $(eole_DIR)/schedule/scripts
70
+endif
71
+extra_REC_DIR		:= $(creole_DIR)/extra
72
+
73
+# Zéphir
74
+zephir_DATA_DIR         := $(DESTDIR)/usr/share/zephir
75
+zephir_configs_DATA_DIR := $(zephir_DATA_DIR)/monitor/configs
76
+zephir_srv_DATA_DIR     := $(zephir_configs_DATA_DIR)/services
77
+zephir_scripts_PROG_DIR := $(zephir_DATA_DIR)/scripts
78
+
79
+# SSO
80
+sso_DATA_DIR            := $(DESTDIR)/usr/share/sso
81
+sso_filtres_DATA_DIR    := $(sso_DATA_DIR)/app_filters
82
+sso_user-info_DATA_DIR  := $(sso_DATA_DIR)/user_infos
83
+
84
+# EAD
85
+ead_DATA_DIR            := $(DESTDIR)/usr/share/ead2/backend/config
86
+ead_actions_DATA_DIR    := $(ead_DATA_DIR)/actions
87
+ead_perms_DATA_DIR      := $(ead_DATA_DIR)/perms
88
+ead_roles_DATA_DIR      := $(ead_DATA_DIR)/roles
89
+
90
+# Program libraries goes under /usr/lib/<PROGRAM>/
91
+lib_$(SOURCE)_DATA_DIR	:= $(DESTDIR)/usr/lib/$(SOURCE)
92
+
93
+# Scripts Eole
94
+scripts_PROG_DIR        := $(eole_DIR)/sbin
95
+lib_eole_DATA_DIR	:= $(DESTDIR)/usr/lib/eole
96
+
97
+# LDAP
98
+ldap_passwords_DATA_DIR := $(eole_DIR)/annuaire/password_files
99
+
100
+# LXC
101
+lxc_DATA_DIR            := $(eole_DIR)/lxc
102
+lxc_fstab_DATA_DIR      := $(lxc_DATA_DIR)/fstab
103
+lxc_hosts_DATA_DIR	:= $(lxc_DATA_DIR)/hosts
104
+
105
+# SQL
106
+sql_DATA_DIR            := $(eole_DIR)/mysql/$(SOURCE)
107
+sql_gen_DATA_DIR        := $(sql_DATA_DIR)/gen
108
+sql_updates_DATA_DIR    := $(sql_DATA_DIR)/updates
109
+
110
+sql_conf_gen_DATA_DIR		:= $(eole_DIR)/applications/gen
111
+sql_conf_passwords_DATA_DIR	:= $(eole_DIR)/applications/passwords
112
+sql_conf_updates_DATA_DIR	:= $(eole_DIR)/applications/updates/$(SOURCE)
113
+
114
+# EoleDB sql directory
115
+db_DIR               := $(eole_DIR)/db
116
+db_gen_DATA_DIR      := $(eole_DIR)/db/$(SOURCE)/gen
117
+db_updates_DATA_DIR  := $(eole_DIR)/db/$(SOURCE)/updates
118
+
119
+# Certifs
120
+certs_DATA_DIR		:= $(eole_DIR)/certs
121
+
122
+# Logrotate
123
+logrotate_DATA_DIR      := $(DESTDIR)/etc/logrotate.d
124
+
125
+# Cron
126
+cron_PROG_DIR 		:= $(DESTDIR)/etc/cron.daily
127
+
128
+# Python modules
129
+ifneq ($(DESTDIR),)
130
+PYTHON_OPTS     := --root $(DESTDIR)
131
+endif
132
+
133
+# Translation
134
+TRANSLATION_SRC := translation
135
+TRANSLATION_DEST := $(DESTDIR)/usr/share/locale
136
+PO_FILES = $(wildcard $(TRANSLATION_SRC)/*/*.po)
137
+MO_FOLDERS = $(addprefix $(TRANSLATION_DEST), $(addsuffix LC_MESSAGES,$(subst $(TRANSLATION_SRC),,$(dir $(PO_FILES)))))
138
+
139
+#############################################
140
+# Common directories and files installation #
141
+#############################################
142
+
143
+all:
144
+
145
+$(MO_FOLDERS):
146
+	$(INSTALL_DIRECTORY) $@
147
+
148
+$(PO_FILES): $(MO_FOLDERS)
149
+	msgfmt -o $(TRANSLATION_DEST)$(subst $(TRANSLATION_SRC),,$(addsuffix LC_MESSAGES,$(dir $@)))/$(notdir $(@:.po=.mo)) $@
150
+
151
+install-lang: $(PO_FILES)
152
+
153
+install:: install-dirs install-files install-lang
154
+
155
+# $1 = command to run
156
+# $2 = source directory
157
+# $3 = destination directory
158
+define fc_install_file
159
+	if [ -d $2 ]; then					\
160
+		for file in `ls -1 $2/`; do			\
161
+		   $1 $2/$$file $3 || true;			\
162
+	    done;						\
163
+	fi
164
+endef
165
+
166
+##
167
+## Directory creation
168
+##
169
+
170
+# use % to catch local name in $*
171
+# data, program and recursive directory require a corresponding
172
+# directory in local sources
173
+%_DATA_DIR %_PROG_DIR %REC_DIR:
174
+	test ! -d $(subst _,/,$*) || $(INSTALL_DIRECTORY) $($@)
175
+
176
+# Create the directory referenced by the variable without a local one.
177
+%_DIR:
178
+	@: # do nothing
179
+
180
+##
181
+## Install files present directly under data, program and recursive directories
182
+##
183
+
184
+# $*   : name of variable
185
+# $($*): value of variable
186
+%-instdata:
187
+	$(call fc_install_file, $(INSTALL_DATA), $(subst _,/,$(subst _DATA_DIR,,$*)), $($*))
188
+
189
+%-instprog:
190
+	$(call fc_install_file, $(INSTALL_PROGRAM), $(subst _,/,$(subst _PROG_DIR,,$*)), $($*))
191
+
192
+%-instrec:
193
+	$(call fc_install_file, $(INSTALL_RECURSIVE), $(subst _,/,$(subst _REC_DIR,,$*)), $($*))
194
+
195
+
196
+# Use second expansion as variables may be created in included
197
+# Makefiles
198
+.SECONDEXPANSION:
199
+
200
+# List of all directories
201
+installdirs_LIST	= $(foreach V, $(filter %_DIR, $(.VARIABLES)),	\
202
+				$(if $(filter file, $(origin $(V))),	\
203
+					$(V)))
204
+# List of data directories
205
+installdata_LIST	= $(filter %_DATA_DIR, $(installdirs_LIST))
206
+# List of program directories
207
+installprog_LIST	= $(filter %_PROG_DIR, $(installdirs_LIST))
208
+# List of recursive directories
209
+installrec_LIST	 	= $(filter %_REC_DIR, $(installdirs_LIST))
210
+
211
+# Expand directories to create as dependency
212
+# Use double-colon to permit user to define additionnal install-dirs
213
+install-dirs:: $$(installdirs_LIST)
214
+
215
+# Expand files to install as dependency
216
+# Use double-colon to permit user to define additionnal install-files
217
+install-files:: install-data-files install-prog-files install-rec-dirs
218
+
219
+install-data-files: $$(patsubst %,%-instdata,$$(installdata_LIST))
220
+
221
+install-prog-files: $$(patsubst %,%-instprog,$$(installprog_LIST))
222
+
223
+install-rec-dirs:   $$(patsubst %,%-instrec,$$(installrec_LIST))
224
+
225
+# Installation of python modules
226
+ifeq ($(shell test -f setup.py && echo 0), 0)
227
+install-files::
228
+	python setup.py install --no-compile --install-layout=deb $(PYTHON_OPTS)
229
+endif
230
+
231
+.PHONY: install install-dirs install-files install-data-files install-prog-files install-rec-dirs

+ 9
- 0
postservice/99-lemonldap-ng View File

@@ -0,0 +1,9 @@
1
+#!/bin/bash
2
+
3
+# Updating Configuration cache
4
+
5
+cmd="/usr/share/lemonldap-ng/bin/lemonldap-ng-cli update-cache"
6
+opt="update-cache"
7
+
8
+res=$(${cmd} ${opt} 2>&1)
9
+exit ${?}

+ 46
- 0
posttemplate/20-init-shib-IDP View File

@@ -0,0 +1,46 @@
1
+#!/bin/bash
2
+
3
+IDPENABLED=$(CreoleGet activer_idp non)
4
+[[ ${IDPENABLED} == "non" ]] && exit 0
5
+
6
+RUN=0
7
+
8
+case $1 in
9
+	instance | init) RUN=1 ;;
10
+	reconfigure) RUN=0 ;;
11
+	*) RUN=0 ;;
12
+esac
13
+
14
+
15
+if [[ ${RUN} -eq 1 ]]
16
+then
17
+	SRCDIR=$(CreoleGet shibbolethIDPSrc)
18
+
19
+	echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre" >> /etc/environment
20
+	echo "IDP_SRC=${SRCDIR}" >> /etc/environment
21
+
22
+	source /etc/environment
23
+	export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
24
+	export IDP_SRC=${SRCDIR}
25
+
26
+	srcdir=${IDP_SRC}
27
+	target="/opt/shibboleth-idp"
28
+	hostname=$(CreoleGet nom_domaine_machine)
29
+	sealerPassword=$(date +%s | sha256sum | base64 | head -c 24)
30
+	keystorePassword=$(date +%s | sha256sum | base64 | head -c 24)
31
+
32
+	echo "${sealerPassword}" >> /root/idp.sealer && chmod 600 /root/idp.sealer
33
+	echo "${keystorePassword}" >> /root/idp.keystorer && chmod 600 /root/idp.sealer
34
+
35
+	CMD="./bin/install.sh"
36
+	OPT="-Didp.src.dir=${srcdir}"
37
+	OPT="${OPT} -Didp.target.dir=${target}"
38
+	OPT="${OPT} -Didp.host.name=${hostname}"
39
+	OPT="${OPT} -Didp.sealer.password=${sealerPassword}"
40
+	OPT="${OPT} -Didp.keystore.password=${keystorePassword}"
41
+
42
+	${CMD} ${OPT}
43
+	exit ${?}
44
+else
45
+	exit 0
46
+fi

+ 14
- 0
preservice/00-idp View File

@@ -0,0 +1,14 @@
1
+#!/bin/bash
2
+
3
+
4
+# Enable apache modules and disable
5
+
6
+if [ "$(CreoleGet activer_idp)" = 'oui' ];then
7
+    # gestion des modes apache
8
+    ENMOD="ssl headers proxy_ajp"
9
+    DISMOD=""
10
+    CreoleRun "a2enmod $ENMOD >/dev/null" web
11
+    [ ! -z $DISMOD ] && CreoleRun "a2dismod $DISMOD >/dev/null" web
12
+fi
13
+
14
+exit 0

+ 21
- 0
pretemplate/29-shib-sp-metadata View File

@@ -0,0 +1,21 @@
1
+#!/bin/bash
2
+
3
+#
4
+# Download SP Metadata if needed
5
+#
6
+
7
+ENABLED=$(CreoleGet activer_idp non)
8
+METADATADIR="/opt/shibboleth-idp/metadata/"
9
+
10
+if [[ ${ENABLED} == "oui" ]]
11
+then
12
+	SP=($(CreoleGet serviceProvider ''))
13
+	for meta in ${SP}
14
+	do
15
+		# FIXME !!!!
16
+		touch ${METADATADIR}/${meta}.xml
17
+	done
18
+fi
19
+
20
+
21
+

+ 201
- 0
src/shibboleth-identity-provider-3.2.1/LICENSE.txt View File

@@ -0,0 +1,201 @@
1
+                                 Apache License
2
+                           Version 2.0, January 2004
3
+                        http://www.apache.org/licenses/
4
+
5
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+   1. Definitions.
8
+
9
+      "License" shall mean the terms and conditions for use, reproduction,
10
+      and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+      "Licensor" shall mean the copyright owner or entity authorized by
13
+      the copyright owner that is granting the License.
14
+
15
+      "Legal Entity" shall mean the union of the acting entity and all
16
+      other entities that control, are controlled by, or are under common
17
+      control with that entity. For the purposes of this definition,
18
+      "control" means (i) the power, direct or indirect, to cause the
19
+      direction or management of such entity, whether by contract or
20
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+      outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+      "You" (or "Your") shall mean an individual or Legal Entity
24
+      exercising permissions granted by this License.
25
+
26
+      "Source" form shall mean the preferred form for making modifications,
27
+      including but not limited to software source code, documentation
28
+      source, and configuration files.
29
+
30
+      "Object" form shall mean any form resulting from mechanical
31
+      transformation or translation of a Source form, including but
32
+      not limited to compiled object code, generated documentation,
33
+      and conversions to other media types.
34
+
35
+      "Work" shall mean the work of authorship, whether in Source or
36
+      Object form, made available under the License, as indicated by a
37
+      copyright notice that is included in or attached to the work
38
+      (an example is provided in the Appendix below).
39
+
40
+      "Derivative Works" shall mean any work, whether in Source or Object
41
+      form, that is based on (or derived from) the Work and for which the
42
+      editorial revisions, annotations, elaborations, or other modifications
43
+      represent, as a whole, an original work of authorship. For the purposes
44
+      of this License, Derivative Works shall not include works that remain
45
+      separable from, or merely link (or bind by name) to the interfaces of,
46
+      the Work and Derivative Works thereof.
47
+
48
+      "Contribution" shall mean any work of authorship, including
49
+      the original version of the Work and any modifications or additions
50
+      to that Work or Derivative Works thereof, that is intentionally
51
+      submitted to Licensor for inclusion in the Work by the copyright owner
52
+      or by an individual or Legal Entity authorized to submit on behalf of
53
+      the copyright owner. For the purposes of this definition, "submitted"
54
+      means any form of electronic, verbal, or written communication sent
55
+      to the Licensor or its representatives, including but not limited to
56
+      communication on electronic mailing lists, source code control systems,
57
+      and issue tracking systems that are managed by, or on behalf of, the
58
+      Licensor for the purpose of discussing and improving the Work, but
59
+      excluding communication that is conspicuously marked or otherwise
60
+      designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+      "Contributor" shall mean Licensor and any individual or Legal Entity
63
+      on behalf of whom a Contribution has been received by Licensor and
64
+      subsequently incorporated within the Work.
65
+
66
+   2. Grant of Copyright License. Subject to the terms and conditions of
67
+      this License, each Contributor hereby grants to You a perpetual,
68
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+      copyright license to reproduce, prepare Derivative Works of,
70
+      publicly display, publicly perform, sublicense, and distribute the
71
+      Work and such Derivative Works in Source or Object form.
72
+
73
+   3. Grant of Patent License. Subject to the terms and conditions of
74
+      this License, each Contributor hereby grants to You a perpetual,
75
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+      (except as stated in this section) patent license to make, have made,
77
+      use, offer to sell, sell, import, and otherwise transfer the Work,
78
+      where such license applies only to those patent claims licensable
79
+      by such Contributor that are necessarily infringed by their
80
+      Contribution(s) alone or by combination of their Contribution(s)
81
+      with the Work to which such Contribution(s) was submitted. If You
82
+      institute patent litigation against any entity (including a
83
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+      or a Contribution incorporated within the Work constitutes direct
85
+      or contributory patent infringement, then any patent licenses
86
+      granted to You under this License for that Work shall terminate
87
+      as of the date such litigation is filed.
88
+
89
+   4. Redistribution. You may reproduce and distribute copies of the
90
+      Work or Derivative Works thereof in any medium, with or without
91
+      modifications, and in Source or Object form, provided that You
92
+      meet the following conditions:
93
+
94
+      (a) You must give any other recipients of the Work or
95
+          Derivative Works a copy of this License; and
96
+
97
+      (b) You must cause any modified files to carry prominent notices
98
+          stating that You changed the files; and
99
+
100
+      (c) You must retain, in the Source form of any Derivative Works
101
+          that You distribute, all copyright, patent, trademark, and
102
+          attribution notices from the Source form of the Work,
103
+          excluding those notices that do not pertain to any part of
104
+          the Derivative Works; and
105
+
106
+      (d) If the Work includes a "NOTICE" text file as part of its
107
+          distribution, then any Derivative Works that You distribute must
108
+          include a readable copy of the attribution notices contained
109
+          within such NOTICE file, excluding those notices that do not
110
+          pertain to any part of the Derivative Works, in at least one
111
+          of the following places: within a NOTICE text file distributed
112
+          as part of the Derivative Works; within the Source form or
113
+          documentation, if provided along with the Derivative Works; or,
114
+          within a display generated by the Derivative Works, if and
115
+          wherever such third-party notices normally appear. The contents
116
+          of the NOTICE file are for informational purposes only and
117
+          do not modify the License. You may add Your own attribution
118
+          notices within Derivative Works that You distribute, alongside
119
+          or as an addendum to the NOTICE text from the Work, provided
120
+          that such additional attribution notices cannot be construed
121
+          as modifying the License.
122
+
123
+      You may add Your own copyright statement to Your modifications and
124
+      may provide additional or different license terms and conditions
125
+      for use, reproduction, or distribution of Your modifications, or
126
+      for any such Derivative Works as a whole, provided Your use,
127
+      reproduction, and distribution of the Work otherwise complies with
128
+      the conditions stated in this License.
129
+
130
+   5. Submission of Contributions. Unless You explicitly state otherwise,
131
+      any Contribution intentionally submitted for inclusion in the Work
132
+      by You to the Licensor shall be under the terms and conditions of
133
+      this License, without any additional terms or conditions.
134
+      Notwithstanding the above, nothing herein shall supersede or modify
135
+      the terms of any separate license agreement you may have executed
136
+      with Licensor regarding such Contributions.
137
+
138
+   6. Trademarks. This License does not grant permission to use the trade
139
+      names, trademarks, service marks, or product names of the Licensor,
140
+      except as required for reasonable and customary use in describing the
141
+      origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+   7. Disclaimer of Warranty. Unless required by applicable law or
144
+      agreed to in writing, Licensor provides the Work (and each
145
+      Contributor provides its Contributions) on an "AS IS" BASIS,
146
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+      implied, including, without limitation, any warranties or conditions
148
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+      PARTICULAR PURPOSE. You are solely responsible for determining the
150
+      appropriateness of using or redistributing the Work and assume any
151
+      risks associated with Your exercise of permissions under this License.
152
+
153
+   8. Limitation of Liability. In no event and under no legal theory,
154
+      whether in tort (including negligence), contract, or otherwise,
155
+      unless required by applicable law (such as deliberate and grossly
156
+      negligent acts) or agreed to in writing, shall any Contributor be
157
+      liable to You for damages, including any direct, indirect, special,
158
+      incidental, or consequential damages of any character arising as a
159
+      result of this License or out of the use or inability to use the
160
+      Work (including but not limited to damages for loss of goodwill,
161
+      work stoppage, computer failure or malfunction, or any and all
162
+      other commercial damages or losses), even if such Contributor
163
+      has been advised of the possibility of such damages.
164
+
165
+   9. Accepting Warranty or Additional Liability. While redistributing
166
+      the Work or Derivative Works thereof, You may choose to offer,
167
+      and charge a fee for, acceptance of support, warranty, indemnity,
168
+      or other liability obligations and/or rights consistent with this
169
+      License. However, in accepting such obligations, You may act only
170
+      on Your own behalf and on Your sole responsibility, not on behalf
171
+      of any other Contributor, and only if You agree to indemnify,
172
+      defend, and hold each Contributor harmless for any liability
173
+      incurred by, or claims asserted against, such Contributor by reason
174
+      of your accepting any such warranty or additional liability.
175
+
176
+   END OF TERMS AND CONDITIONS
177
+
178
+   APPENDIX: How to apply the Apache License to your work.
179
+
180
+      To apply the Apache License to your work, attach the following
181
+      boilerplate notice, with the fields enclosed by brackets "[]"
182
+      replaced with your own identifying information. (Don't include
183
+      the brackets!)  The text should be enclosed in the appropriate
184
+      comment syntax for the file format. We also recommend that a
185
+      file or class name and description of purpose be included on the
186
+      same "printed page" as the copyright notice for easier
187
+      identification within third-party archives.
188
+
189
+   Copyright [yyyy] [name of copyright owner]
190
+
191
+   Licensed under the Apache License, Version 2.0 (the "License");
192
+   you may not use this file except in compliance with the License.
193
+   You may obtain a copy of the License at
194
+
195
+       http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+   Unless required by applicable law or agreed to in writing, software
198
+   distributed under the License is distributed on an "AS IS" BASIS,
199
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+   See the License for the specific language governing permissions and
201
+   limitations under the License.

+ 4
- 0
src/shibboleth-identity-provider-3.2.1/bin/aacli.bat View File

@@ -0,0 +1,4 @@
1
+@echo off
2
+setlocal
3
+
4
+"%~dp0\runclass.bat" -Dnet.shibboleth.idp.cli.arguments=net.shibboleth.idp.cli.ResolverTestArguments net.shibboleth.idp.cli.CLI %*

+ 9
- 0
src/shibboleth-identity-provider-3.2.1/bin/aacli.sh View File

@@ -0,0 +1,9 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+
5
+LOCATION=$0
6
+LOCATION=${LOCATION%/*}
7
+
8
+$LOCATION/runclass.sh -Dnet.shibboleth.idp.cli.arguments=net.shibboleth.idp.cli.ResolverTestArguments \
9
+    net.shibboleth.idp.cli.CLI "$@"

+ 113
- 0
src/shibboleth-identity-provider-3.2.1/bin/ant-jetty.xml View File

@@ -0,0 +1,113 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project name="Shibboleth IdP V3 - Jetty Container" basedir=".." default="install">
3
+
4
+    <!--  This file is for automatic configuration of Jetty, primarily from the MSI installer.
5
+
6
+       	Names and APIS *may* change in the future, please enter an RFI if you wish to use this
7
+       	in production outside the MSI installer.
8
+
9
+        TARGETS:
10
+
11
+        	The only top level target is "install".  This in turn calls subsidiary targets.
12
+
13
+        PROPERTIES:
14
+
15
+            The following properties are used.  They have to be provided on the command line or
16
+            via the property file.
17
+
18
+            jetty.property.file: Name of a file to fill in all or some of the below. This file is deleted after processing.
19
+            jetty.merge.properties: The name of a property file to merge with idp.ini.  This file is deleted after processing.
20
+            idp.host.name: The host name.
21
+            idp.uri.subject.alt.name: If we are creating certificates.
22
+            idp.target.dir: where to install to.
23
+
24
+            idp.keystore.password: password to use on the PKCS12 file for a user-facing TLS credential,
25
+                which will be created if one does not already exist either in JKS or PKCS12 form.
26
+                This value must also have been written to the merge properties file as
27
+                jetty.browser.keystore.password.
28
+
29
+            jetty.no.tidy: Do not delete the two above files (debug only)
30
+
31
+    -->
32
+
33
+    <taskdef resource="net/shibboleth/idp/installer/ant.xml" />
34
+
35
+    <target name="install" depends="init, properties, keystores, directories, copyinis, reprotect, tidy" />
36
+
37
+    <target name="init">
38
+        <tstamp />
39
+        <hostinfo />
40
+    </target>
41
+
42
+    <target name="properties">
43
+        <property file="${jetty.property.file}" />
44
+        <available property="idp.ini.present" file="${idp.target.dir}/jetty-base/start.d/idp.ini" />
45
+        <available property="idp.jks.present" file="${idp.target.dir}/credentials/idp.jks" />
46
+        <available property="idp.userfacing.p12.present" file="${idp.target.dir}/credentials/idp-userfacing.p12" />
47
+        <condition property="generate.userfacing.p12">
48
+            <!-- Generate the pkcs12 keystore if neither the JKS nor the P12 exist -->
49
+            <not>
50
+                <or>
51
+                    <istrue value="${idp.jks.present}" />
52
+                    <istrue value="${idp.userfacing.p12.present}" />
53
+                </or>
54
+            </not>
55
+        </condition>
56
+    </target>
57
+
58
+    <!-- Handle keystores -->
59
+    <target name="keystores" depends="jks, gen-userfacing" />
60
+
61
+    <target name="jks" if="idp.jks.present">
62
+      	<!-- Note that this password is the old default for QI.  This will overwrite what we may have put in when the merge file was created. -->
63
+      	<echo file="${jetty.merge.properties}" append="yes">
64
+        	jetty.backchannel.keystore.type=JKS
65
+        	jetty.browser.keystore.type=JKS
66
+        	jetty.backchannel.keystore.password= SeCrEt
67
+        	jetty.browser.keystore.password= SeCrEt
68
+        	jetty.backchannel.keystore.path= ${idp.target.dir}/credentials/idp.jks
69
+        	jetty.browser.keystore.path= ${idp.target.dir}/credentials/idp.jks
70
+        </echo>
71
+    </target>
72
+
73
+    <target name="gen-userfacing" if="generate.userfacing.p12">
74
+        <selfsignedcert hostname="${idp.host.name}" keystoreFile="${idp.target.dir}/credentials/idp-userfacing.p12" keystorePassword="${idp.keystore.password}" uriSubjectAltNames="${idp.uri.subject.alt.name}" />
75
+    </target>
76
+
77
+    <target name="directories">
78
+        <mkdir dir="jetty-base/start.d" />
79
+        <mkdir dir="jetty-base/logs" />
80
+        <mkdir dir="static" />
81
+    </target>
82
+
83
+    <target name="copyinis" depends="directories, copyidpini">
84
+        <copy file="jetty-base/start.d.dist/jsp.ini" tofile="jetty-base/start.d/jsp.ini" overwrite="false" failonerror="false" />
85
+        <copy file="jetty-base/start.d.dist/jstl.ini" tofile="jetty-base/start.d/jstl.ini" overwrite="false" failonerror="false" />
86
+    </target>
87
+
88
+    <target name="copyidpini" depends="directories" unless="idp.ini.present">
89
+        <mergeproperties inFile="${idp.target.dir}/jetty-base/start.d.dist/idp.ini" outFile="${idp.target.dir}/jetty-base/start.d/idp.ini" mergeFile="${jetty.merge.properties}" />
90
+    </target>
91
+
92
+   <target name="reprotect">
93
+       <chmod perm="600" dir="jetty-base/start.d" includes="**/*.key"/>
94
+       <chmod perm="444" dir="jetty-base/etc" includes="**/*"/>
95
+       <chmod perm="444" dir="jetty-base/lib" includes="**/*"/>
96
+       <chmod perm="444" dir="jetty-base/webapps" includes="**/*"/>
97
+       <attrib readonly="true">
98
+           <fileset dir="jetty-base/etc" includes="**/*"/>
99
+       </attrib>
100
+    	<attrib readonly="true">
101
+        	<fileset dir="jetty-base/lib" includes="**/*"/>
102
+    	</attrib>
103
+    	<attrib readonly="true">
104
+        	<fileset dir="jetty-base/webapps" includes="**/*"/>
105
+    	</attrib>
106
+    </target>
107
+
108
+    <target name="tidy" unless="jetty.no.tidy">
109
+        <delete file="${jetty.merge.properties}" failonerror="false" />
110
+        <delete file="${jetty.property.file}" failonerror="false" />
111
+    </target>
112
+
113
+</project>

+ 34
- 0
src/shibboleth-identity-provider-3.2.1/bin/ant.bat View File

@@ -0,0 +1,34 @@
1
+@echo off
2
+setlocal
3
+
4
+REM Find the necessary resources
5
+set ANT_HOME=%~dp0
6
+
7
+REM strip trailing backslash - it confuses java.
8
+REM do it like this because embedding the strip inside an if causes problems if the name has a ")" in it. 
9
+if "%ANT_HOME:~-1%" NEQ "\" (
10
+   goto nostrip
11
+)
12
+set ANT_HOME=%ANT_HOME:~0,-1%
13
+:nostrip
14
+
15
+REM We need a JVM
16
+if not defined JAVA_HOME  (
17
+  echo Error: JAVA_HOME is not defined.
18
+  exit /b
19
+)
20
+
21
+if not defined JAVACMD (
22
+  set JAVACMD="%JAVA_HOME%\bin\java.exe"
23
+)
24
+
25
+if not exist %JAVACMD% (
26
+  echo Error: JAVA_HOME is not defined correctly.
27
+  echo Cannot execute %JAVACMD%
28
+  exit /b
29
+)
30
+
31
+REM add in the dependency .jar files
32
+set LOCALCLASSPATH=%ANT_HOME%\..\bin\lib\*;%ANT_HOME%\..\webapp\WEB-INF\lib\*;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;%CLASSPATH%
33
+
34
+%JAVACMD% -cp "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main -e -q -f "%ANT_HOME%/build.xml" %*

+ 84
- 0
src/shibboleth-identity-provider-3.2.1/bin/ant.sh View File

@@ -0,0 +1,84 @@
1
+#! /bin/sh
2
+
3
+# OS specific support.  $var _must_ be set to either true or false.
4
+cygwin=false;
5
+darwin=false;
6
+case "`uname`" in
7
+  CYGWIN*) cygwin=true ;;
8
+  Darwin*) darwin=true ;;
9
+esac
10
+
11
+#Find the necessary resources
12
+ANT_HOME=$0
13
+ANT_HOME=${ANT_HOME%/*}
14
+
15
+if [ -z "$JAVACMD" ] ; then 
16
+  if [ -n "$JAVA_HOME"  ] ; then
17
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
18
+      # IBM's JDK on AIX uses strange locations for the executables
19
+      JAVACMD=$JAVA_HOME/jre/sh/java
20
+    else
21
+      JAVACMD=$JAVA_HOME/bin/java
22
+    fi
23
+  else
24
+    JAVACMD=java
25
+  fi
26
+fi
27
+ 
28
+if [ ! -x "$JAVACMD" ] ; then
29
+  echo "Error: JAVA_HOME is not defined correctly."
30
+  echo "  We cannot execute $JAVACMD"
31
+  exit 1
32
+fi
33
+
34
+if [ -n "$CLASSPATH" ] ; then
35
+  LOCALCLASSPATH=$CLASSPATH
36
+fi
37
+
38
+# add in the dependency .jar files
39
+LOCALCLASSPATH="${ANT_HOME}/../webapp/WEB-INF/lib/*":$LOCALCLASSPATH
40
+LOCALCLASSPATH="${ANT_HOME}/../bin/lib/*":$LOCALCLASSPATH
41
+
42
+if [ -n "$JAVA_HOME" ] ; then
43
+  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
44
+    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
45
+  fi
46
+
47
+  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
48
+    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
49
+  fi
50
+
51
+  # OSX hack to make Ant work with jikes
52
+  if $darwin ; then
53
+    OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
54
+    if [ -d ${OSXHACK} ] ; then
55
+      for i in ${OSXHACK}/*.jar
56
+      do
57
+        JIKESPATH=$JIKESPATH:$i
58
+      done
59
+    fi
60
+  fi
61
+
62
+else
63
+  echo "Warning: JAVA_HOME environment variable is not set."
64
+  echo "  If build fails because sun.* classes could not be found"
65
+  echo "  you will need to set the JAVA_HOME environment variable"
66
+  echo "  to the installation directory of java."
67
+fi
68
+
69
+# supply JIKESPATH to Ant as jikes.class.path
70
+if [ -n "$JIKESPATH" ] ; then
71
+  if [ -n "$ANT_OPTS" ] ; then
72
+    ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
73
+  else
74
+    ANT_OPTS=-Djikes.class.path=$JIKESPATH
75
+  fi
76
+fi
77
+
78
+# For Cygwin, switch paths to Windows format before running java
79
+if $cygwin; then
80
+  ANT_HOME=`cygpath --path --windows "$ANT_HOME"`
81
+  JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
82
+  LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
83
+fi
84
+$JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main -e -q -f "${ANT_HOME}/build.xml" "$@"

+ 4
- 0
src/shibboleth-identity-provider-3.2.1/bin/build.bat View File

@@ -0,0 +1,4 @@
1
+@echo off
2
+setlocal
3
+
4
+"%~dp0\ant.bat" %* build-war

+ 8
- 0
src/shibboleth-identity-provider-3.2.1/bin/build.sh View File

@@ -0,0 +1,8 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+
5
+LOCATION=$0
6
+LOCATION=${LOCATION%/*}
7
+
8
+$LOCATION/ant.sh "$@" build-war

+ 703
- 0
src/shibboleth-identity-provider-3.2.1/bin/build.xml View File

@@ -0,0 +1,703 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project name="Shibboleth Identity Provider V3" basedir=".." default="install"
3
+    xmlns:if="ant:if"
4
+    xmlns:unless="ant:unless">  
5
+
6
+    <taskdef resource="net/shibboleth/idp/installer/ant.xml" />
7
+
8
+    <!--  TARGETS:
9
+
10
+        The following top level targets are implemented and supported.  These in turn call subsidiary targets,
11
+        whose use outside this file is not supported.
12
+
13
+        install-nocopy:  Does the installation/upgrade on a layout that has been copied (ie, the important
14
+                         stuff has been copied or overwritten from the distribution)
15
+                         A V2 upgrade will be performed if a V2 site is detected.
16
+        build-war:       Create the war file
17
+        install:         Copies files from the distribution to the specified target and then
18
+                         invokes install-nocopy
19
+
20
+        PROPERTIES:
21
+        The following properties are used.  If they are not specified on the command line then
22
+        they will be prompted for if needed.
23
+
24
+        idp.src.dir (update only):  Where to install from.  No default
25
+        idp.target.dir (all): where to install to.  Default is basedir.
26
+        idp.host.name: If we are creating certificates
27
+        idp.uri.subject.alt.name: If we are creating certificates.  Defaulted
28
+        idp.sealer.password:
29
+        idp.sealer.alias:
30
+        idp.keystore.password:
31
+        idp.scope: The scope to assert.  If present this should also be present in idp.merge.properties
32
+        idp.merge.properties: The name of a property file to merge with idp.properties.  This file only
33
+          used when doing the initial create of idp.properties, and is deleted after processing
34
+            - if idp.noprompt is set, then this file should contain a line setting idp.entityID.
35
+            - if idp.sealer.password is set, then this file should contain a line setting idp.sealer.storePassword and idp.sealer.keyPassword
36
+            - if idp.scope is present, then this file should contain a line setting idp.scope
37
+        services.merge.properties: The name of a property file to merge with services.properties
38
+            - if idp.is.V2 is set, then this file should contain a line setting
39
+                idp.service.relyingparty.resources=shibboleth.LegacyRelyingPartyResolverResources
40
+        nameid.merge.properties: The name of a property file to merge with saml-nameid.properties
41
+            - if idp.is.V2 is set, then this file should contain lines enabling legacy nameid generation
42
+        idp.property.file: The name of a property file to fill in some or all of the above. This file is deleted after processing.
43
+        idp.no.tidy: Do not delete the two above files (debug only)
44
+        idp.jetty.config: Copy jetty configuration from distribution (Unsupported)
45
+        ldap.merge.properties:  The name of a property file to merge with ldap.properties
46
+        idp.conf.filemode (default "600"): The permissions to mark the files in conf with (UNIX only).
47
+
48
+        The property idp.noprompt will cause a failure rather than a prompt.
49
+    -->
50
+
51
+    <macrodef name="TGT" description="log the invocation of an Ant target">
52
+        <text name="t" description="name of the target being invoked"/>
53
+        <sequential>
54
+            <echo append="true" file="idp_ant.log">target: @{t}${line.separator}</echo>
55
+        </sequential>
56
+    </macrodef>
57
+
58
+    <target name="init">
59
+        <tstamp />
60
+        <hostinfo />
61
+        <TGT>init</TGT>
62
+    </target>
63
+
64
+    <target name="install" depends="init, preload, getsource, gettarget, v2v3prepopulate, allinput, copy-distribution, copy-jetty-distribution, install-nocopy, tidy" />
65
+    <target name="install-nocopy" depends="init, preload, gettarget, v2v3prepopulate, allinput, genkeys, upgrade, metadata-gen, reprotect, build-war, tidy" />
66
+
67
+    <!-- USER INPUT -->
68
+    <target name="preload" if="idp.property.file">
69
+        <TGT>preload</TGT>
70
+        <property file="${idp.property.file}"/>
71
+    </target>
72
+    <target name="allinput" depends="gettarget, checkproperties, gethostname, getentityid, geturisubjectaltname, setscope, askscope, writescope, getkeystorepassword, getsealerpassword, getsealeralias" />
73
+
74
+    <target name="gethostname" if="idp.ask.hostname" depends="checkproperties">
75
+        <TGT>gethostname</TGT>
76
+        <fail if="idp.noprompt">Input needed, silence demanded</fail>
77
+        <input message="Hostname:" addproperty="idp.host.name" defaultvalue="${NAME}.${DOMAIN}" />
78
+    </target>
79
+
80
+    <target name="geturisubjectaltname" if="idp.generate.altname" depends="checkproperties, gethostname">
81
+        <TGT>geturisubjectname</TGT>
82
+        <property name="idp.uri.subject.alt.name" value="https://${idp.host.name}/idp/shibboleth" />
83
+    </target>
84
+
85
+    <target name="getkeystorepassword" if="idp.ask.keystore.password" depends="checkproperties">
86
+        <TGT>getkeystorepassword</TGT>
87
+        <fail if="idp.noprompt">Input needed, silence demanded</fail>
88
+        <input message="Backchannel PKCS12 Password: " addproperty="idp.keystore.password">
89
+            <handler classname="net.shibboleth.idp.installer.ant.PasswordHandler"/>
90
+        </input>
91
+    </target>
92
+
93
+    <target name="getsealerpassword" if="idp.ask.sealer.password" depends="checkproperties">
94
+        <TGT>getsealerpassword</TGT>
95
+        <fail if="idp.noprompt">Input needed, silence demanded</fail>
96
+        <input message="Cookie Encryption Key Password: " addproperty="idp.sealer.password">
97
+            <handler classname="net.shibboleth.idp.installer.ant.PasswordHandler"/>
98
+        </input>
99
+        <echo file="${idp.merge.properties}" append="yes">
100
+            idp.sealer.storePassword=${idp.sealer.password}
101
+        </echo>
102
+        <echo file="${idp.merge.properties}" append="yes">
103
+            idp.sealer.keyPassword=${idp.sealer.password}
104
+        </echo>
105
+    </target>
106
+
107
+    <target name="getsealeralias" if="idp.ask.sealer.alias" depends="checkproperties">
108
+        <TGT>getsealeralias</TGT>
109
+        <!--
110
+        <fail if="idp.noprompt">Input needed, silence demanded</fail>
111
+        <input message="Sealer Alias" addproperty="idp.sealer.alias" defaultvalue="secret"/>
112
+        -->
113
+        <property name="idp.sealer.alias" value="secret"/>
114
+    </target>
115
+
116
+    <target name="getsource" unless="idp.src.dir">
117
+        <TGT>getsource</TGT>
118
+        <fail if="idp.noprompt">Input needed, silence demanded</fail>
119
+        <input message="Source (Distribution) Directory:" addproperty="idp.src.dir" defaultvalue="${basedir}" />
120
+    </target>
121
+
122
+    <target name="gettarget" depends="target-properties, setmerge, setservicemerge, target-src-default, target-nosrc-default, prompttarget, settarget, setfilemode" />
123
+
124
+    <target name="setmerge" unless="idp.merge.properties.present">
125
+        <property name="idp.merge.properties" value="replace.properties" />
126
+    </target>
127
+
128
+    <target name="setservicemerge" unless="services.merge.properties.present">
129
+        <property name="services.merge.properties" value="replace.services.properties" />
130
+    </target>
131
+
132
+    <target name="setfilemode" unless="idp.conf.filemode.present">
133
+        <property name="idp.conf.filemode" value="600" />
134
+    </target>
135
+
136
+    <target name="setnameidmerge" unless="nameid.merge.properties.present">
137
+        <property name="nameid.merge.properties" value="replace.nameid.properties" />
138
+    </target>
139
+
140
+    <target name="target-src-default" unless="idp.src.dir.present">
141
+        <TGT>target-src-default</TGT>
142
+        <!-- if the source isn't set up then the default is basedir -->
143
+        <property name="idp.target.default" value="${basedir}" />
144
+    </target>
145
+
146
+    <target name="target-nosrc-default" if="idp.src.dir.present">
147
+        <TGT>target-nosrc-default</TGT>
148
+        <!-- if the source is set up then the default must not be basedir -->
149
+        <property name="idp.target.default" value="/opt/shibboleth-idp" />
150
+    </target>
151
+
152
+    <target name="prompttarget" if="idp.ask.target">
153
+        <TGT>prompttarget</TGT>
154
+        <fail if="idp.noprompt">Input needed, silence demanded</fail>
155
+        <input message="Installation Directory:" addproperty="idp.target.dir" defaultvalue="${idp.target.default}" />
156
+    </target>
157
+
158
+    <target name="settarget" if="idp.set.target">
159
+        <TGT>settarget</TGT>
160
+        <property name="idp.target.dir" value="${basedir}" />
161
+    </target>
162
+
163
+    <target name="getentityid" if="idp.ask.entityid" depends="checkproperties">
164
+        <TGT>getentityid</TGT>
165
+        <fail if="idp.noprompt">Input needed, silence demanded</fail>
166
+        <local name="entityid" />
167
+        <input message="SAML EntityID:" addproperty="entityid" defaultvalue="https://${idp.host.name}/idp/shibboleth" />
168
+        <property name="idp.uri.subject.alt.name" value="${entityid}" />
169
+        <echo file="${idp.merge.properties}" append="yes">
170
+            idp.entityID=${entityid}
171
+        </echo>
172
+    </target>
173
+
174
+    <target name="setscope" if="idp.set.scope" depends="checkproperties">
175
+        <TGT>setscope</TGT>
176
+        <property name="idp.scope" value="${DOMAIN}"/>
177
+    </target>
178
+
179
+    <target name="askscope" if="idp.ask.scope" depends="checkproperties">
180
+        <TGT>askscope</TGT>
181
+        <input message="Attribute Scope:" addproperty="idp.scope" defaultvalue="${DOMAIN}" />
182
+    </target>
183
+
184
+    <target name="writescope" if="idp.write.scope" depends="setscope, askscope">
185
+        <TGT>writescope</TGT>
186
+        <echo file="${idp.merge.properties}" append="yes">
187
+           idp.scope=${idp.scope}
188
+        </echo>
189
+    </target>
190
+    
191
+    <!--
192
+     KEY MANAGEMENT
193
+    -->
194
+
195
+    <target name="genkeys" depends="init, preload, checkproperties, signing-key, encryption-key, backchannel-key, sealer" />
196
+
197
+    <target name="checkproperties" depends="gettarget, v2detect, target-properties">
198
+        <TGT>checkproperties</TGT>
199
+        <condition property="idp.metadata.present">
200
+            <or>
201
+                <istrue value="${idp.is.V2}" />
202
+                <available file="${idp.target.dir}/metadata/idp-metadata.xml" />
203
+            </or>
204
+        </condition>
205
+        <available property="idp.sealer.present" file="${idp.target.dir}/credentials/sealer.kver" />
206
+        <available property="idp.properties.present" file="${idp.target.dir}/conf/idp.properties" />
207
+        <available property="nameid.properties.present" file="${idp.target.dir}/conf/saml-nameid.properties" />
208
+        <available property="ldap.properties.present" file="${idp.target.dir}/conf/ldap.properties" />
209
+        <available property="services.properties.present" file="${idp.target.dir}/conf/services.properties" />
210
+        <condition property="idp.will.call.certgen">
211
+          <!-- We will call CertGen if there is no relying party.  Otherwise the certificates are deemed to be there -->
212
+          <not>
213
+            <istrue value="${idp.relying.party.present}" />
214
+          </not>
215
+        </condition>
216
+
217
+        <condition property="idp.ask.entityid">
218
+            <!-- Ask for EntityID if this is not an upgrade and the property file wasn't provided -->
219
+            <and>
220
+                <not>
221
+                    <istrue value="${idp.merge.properties.present}" />
222
+                </not>
223
+                <not>
224
+                    <istrue value="${idp.properties.present}" />
225
+                </not>
226
+            </and>
227
+        </condition>
228
+
229
+        <condition property="idp.ask.hostname">
230
+            <!-- We ask for host name if there is no host name and we will call certgen or ask for entityID -->
231
+            <and>
232
+                <not>
233
+                    <isset property="idp.host.name" />
234
+                </not>
235
+                <or>
236
+                    <istrue value="${idp.will.call.certgen}" />
237
+                    <istrue value="${idp.ask.entityid}" />
238
+                </or>
239
+            </and>
240
+        </condition>
241
+
242
+        <condition property="idp.ask.scope">
243
+            <!-- We ask for scope if there is no scope and we allow user input and there is no idp properties file -->
244
+            <and>
245
+                <not>
246
+                    <isset property="idp.scope" />
247
+                </not>
248
+                <not>
249
+                    <isset property="idp.noprompt" />
250
+                </not>
251
+                <isfalse value="${idp.properties.present}" />
252
+            </and>
253
+        </condition>
254
+
255
+        <condition property="idp.set.scope">
256
+            <!-- We set scope if there is no scope and we do not allow user input and there is no idp properties file -->
257
+            <and>
258
+                <not>
259
+                    <isset property="idp.scope" />
260
+                </not>
261
+                <isset property="idp.noprompt" />
262
+                <isfalse value="${idp.properties.present}" />
263
+            </and>
264
+        </condition>
265
+
266
+        <condition property="idp.write.scope">
267
+            <!-- We write the scope if we set it, ask for it, or if its supplied -->
268
+            <or>
269
+                <isset property="idp.scope" />
270
+                <isset property="idp.ask.scope" />
271
+                <isset property="idp.write.scope" />
272
+            </or>
273
+        </condition>
274
+
275
+        <condition property="idp.generate.altname">
276
+            <!-- We ask for alt name if there is no alt name and we will call certgen -->
277
+            <and>
278
+                <not>
279
+                    <isset property="idp.uri.subject.alt.name" />
280
+                </not>
281
+                <istrue value="${idp.will.call.certgen}" />
282
+            </and>
283
+        </condition>
284
+
285
+        <condition property="idp.ask.keystore.password">
286
+            <!-- We ask for keystore password if there is no keystore password and
287
+                 the relying party (and hence keys) are not there -->
288
+            <and>
289
+                <not>
290
+                    <isset property="idp.keystore.password" />
291
+                </not>
292
+                <not>
293
+                    <istrue value="${idp.relying.party.present}" />
294
+                </not>
295
+            </and>
296
+        </condition>
297
+
298
+        <condition property="idp.ask.sealer.password">
299
+            <!-- We ask for sealer password if there is no sealer password and no sealer -->
300
+            <and>
301
+                <not>
302
+                    <isset property="idp.sealer.password" />
303
+                </not>
304
+                <not>
305
+                    <istrue value="${idp.sealer.present}" />
306
+                </not>
307
+            </and>
308
+        </condition>
309
+
310
+        <condition property="idp.ask.sealer.alias">
311
+            <!-- We ask for sealer alias if there is no sealer alias and no sealer -->
312
+            <and>
313
+                <not>
314
+                    <isset property="idp.sealer.alias" />
315
+                </not>
316
+                <not>
317
+                    <istrue value="${idp.sealer.present}" />
318
+                </not>
319
+            </and>
320
+        </condition>
321
+
322
+        <condition property="idp.merge.ldap.properties">
323
+            <!-- We merge ldap.properties if ldap.merge.properties is set  AND ldap.properties does NOT exist-->
324
+            <and>
325
+                <isset property="ldap.merge.properties" />
326
+                <not>
327
+                    <istrue value="${ldap.properties.present}" />
328
+                </not>
329
+            </and>
330
+        </condition>
331
+    </target>
332
+
333
+    <target name="target-properties">
334
+        <TGT>target-properties</TGT>
335
+        <condition property="idp.ask.target">
336
+            <and>
337
+                <not>
338
+                    <isset property="idp.target.dir" />
339
+                </not>
340
+                <not>
341
+                    <isset property="idp.noprompt" />
342
+                </not>
343
+            </and>
344
+        </condition>
345
+
346
+        <condition property="idp.set.target">
347
+            <and>
348
+                <not>
349
+                    <isset property="idp.target.dir" />
350
+                </not>
351
+                <isset property="idp.noprompt" />
352
+            </and>
353
+        </condition>
354
+
355
+        <condition property="idp.src.dir.present">
356
+            <isset property="idp.src.dir" />
357
+        </condition>
358
+
359
+        <condition property="idp.merge.properties.present">
360
+            <isset property="idp.merge.properties" />
361
+        </condition>
362
+
363
+        <condition property="nameid.merge.properties.present">
364
+            <isset property="nameid.merge.properties" />
365
+        </condition>
366
+
367
+        <condition property="services.merge.properties.present">
368
+            <isset property="services.merge.properties" />
369
+        </condition>
370
+
371
+        <condition property="idp.conf.filemode.present">
372
+            <isset property="idp.conf.filemode"/>
373
+        </condition>
374
+    </target>
375
+
376
+    <target name="signing-key" unless="idp.relying.party.present" depends="gethostname, geturisubjectaltname">
377
+        <TGT>signing-key</TGT>
378
+        <echo>Generating Signing Key, CN = ${idp.host.name} URI = ${idp.uri.subject.alt.name} ...</echo>
379
+        <mkdir dir="${idp.target.dir}/credentials"/>
380
+        <selfsignedcert hostname="${idp.host.name}" privateKeyFile="${idp.target.dir}/credentials/idp-signing.key" certificateFile="${idp.target.dir}/credentials/idp-signing.crt" uriSubjectAltNames="${idp.uri.subject.alt.name}" />
381
+        <echo>...done</echo>
382
+    </target>
383
+
384
+    <target name="encryption-key" unless="idp.relying.party.present" depends="gethostname, geturisubjectaltname">
385
+        <TGT>encryption-key</TGT>
386
+        <echo>Creating Encryption Key, CN = ${idp.host.name} URI = ${idp.uri.subject.alt.name} ...</echo>
387
+        <mkdir dir="${idp.target.dir}/credentials"/>
388
+        <selfsignedcert hostname="${idp.host.name}" privateKeyFile="${idp.target.dir}/credentials/idp-encryption.key" certificateFile="${idp.target.dir}/credentials/idp-encryption.crt" uriSubjectAltNames="${idp.uri.subject.alt.name}" />
389
+        <echo>...done</echo>
390
+    </target>
391
+
392
+    <target name="backchannel-key" unless="idp.relying.party.present" depends="getkeystorepassword, gethostname, geturisubjectaltname">
393
+        <TGT>backchannel-key</TGT>
394
+        <echo>Creating Backchannel keystore, CN = ${idp.host.name} URI = ${idp.uri.subject.alt.name} ...</echo>
395
+        <mkdir dir="${idp.target.dir}/credentials"/>
396
+        <selfsignedcert hostname="${idp.host.name}" keystoreFile="${idp.target.dir}/credentials/idp-backchannel.p12" certificateFile="${idp.target.dir}/credentials/idp-backchannel.crt" keystorePassword="${idp.keystore.password}" uriSubjectAltNames="${idp.uri.subject.alt.name}" />
397
+        <echo>...done</echo>
398
+    </target>
399
+
400
+    <target name="sealer" unless="idp.sealer.present" depends="getsealerpassword, getsealeralias">
401
+        <TGT>sealer</TGT>
402
+        <echo>Creating cookie encryption key files...</echo>
403
+        <mkdir dir="${idp.target.dir}/credentials"/>
404
+        <keystorestrategy keystoreFile="${idp.target.dir}/credentials/sealer.jks" versionFile="${idp.target.dir}/credentials/sealer.kver" keyAlias="${idp.sealer.alias}" keystorePassword="${idp.sealer.password}" />
405
+        <echo>...done</echo>
406
+    </target>
407
+
408
+    <!--
409
+     GENERAL V3 TO V3 UPGRADE
410
+    -->
411
+
412
+    <target name="upgrade" depends="editproperties, editservicesproperties, editnameidproperties, editldapproperties, handleeditwebapp">
413
+        <TGT>upgrade</TGT>
414
+
415
+        <!-- conf: copy from dist if not already present -->
416
+        <mkdir dir="${idp.target.dir}/conf" />
417
+        <copy todir="${idp.target.dir}/conf">
418
+            <fileset dir="${idp.target.dir}/dist/conf" includes="**/*">
419
+                <present present="srconly" targetdir="${idp.target.dir}/conf">
420
+                    <mapper type="glob" from="*.dist" to="*" />
421
+                </present>
422
+            </fileset>
423
+            <mapper type="glob" from="*.dist" to="*" />
424
+        </copy>
425
+
426
+        <!-- flows: copy from dist if not already present -->
427
+        <mkdir dir="${idp.target.dir}/flows" />
428
+        <copy todir="${idp.target.dir}/flows">
429
+            <fileset dir="${idp.target.dir}/dist/flows" includes="**/*">
430
+                <present present="srconly" targetdir="${idp.target.dir}/flows">
431
+                    <mapper type="glob" from="*.dist" to="*" />
432
+                </present>
433
+            </fileset>
434
+            <mapper type="glob" from="*.dist" to="*" />
435
+        </copy>
436
+
437
+        <!-- messages: copy from dist if not already present -->
438
+        <mkdir dir="${idp.target.dir}/messages" />
439
+        <copy todir="${idp.target.dir}/messages">
440
+            <fileset dir="${idp.target.dir}/dist/messages" includes="**/*">
441
+                <present present="srconly" targetdir="${idp.target.dir}/messages">
442
+                    <mapper type="glob" from="*.dist" to="*" />
443
+                </present>
444
+            </fileset>
445
+            <mapper type="glob" from="*.dist" to="*" />
446
+        </copy>
447
+
448
+        <!-- views: copy from dist if not already present -->
449
+        <mkdir dir="${idp.target.dir}/views" />
450
+        <copy todir="${idp.target.dir}/views">
451
+            <fileset dir="${idp.target.dir}/dist/views" includes="**/*">
452
+                <present present="srconly" targetdir="${idp.target.dir}/views">
453
+                    <mapper type="glob" from="*.dist" to="*" />
454
+                </present>
455
+            </fileset>
456
+            <mapper type="glob" from="*.dist" to="*" />
457
+        </copy>
458
+
459
+        <!-- Other dirs -->
460
+        <mkdir dir="${idp.target.dir}/logs" />
461
+    </target>
462
+
463
+    <target name="editproperties" depends="gettarget, getentityid" unless="idp.properties.present">
464
+        <TGT>editproperties</TGT>
465
+        <mkdir dir="${idp.target.dir}/conf" />
466
+        <mergeproperties inFile="${idp.target.dir}/dist/conf/idp.properties.dist" outFile="${idp.target.dir}/conf/idp.properties" mergeFile="${idp.merge.properties}" />
467
+    </target>
468
+
469
+    <target name="editservicesproperties" depends="gettarget" if="idp.is.V2" unless="services.properties.present">
470
+        <TGT>editservicesproperties</TGT>
471
+        <mkdir dir="${idp.target.dir}/conf" />
472
+        <mergeproperties inFile="${idp.target.dir}/dist/conf/services.properties.dist" outFile="${idp.target.dir}/conf/services.properties" mergeFile="${services.merge.properties}" />
473
+    </target>
474
+
475
+    <target name="editnameidproperties" depends="gettarget" if="idp.is.V2" unless="nameid.properties.present">
476
+        <TGT>editnameidproperties</TGT>
477
+        <mkdir dir="${idp.target.dir}/conf" />
478
+        <mergeproperties inFile="${idp.target.dir}/dist/conf/saml-nameid.properties.dist" outFile="${idp.target.dir}/conf/saml-nameid.properties" mergeFile="${nameid.merge.properties}" />
479
+    </target>
480
+
481
+    <target name="editldapproperties" depends="gettarget" if="idp.merge.ldap.properties" unless="ldap.properties.present">
482
+        <TGT>editldapproperties</TGT>
483
+        <mkdir dir="${idp.target.dir}/conf" />
484
+        <mergeproperties inFile="${idp.target.dir}/dist/conf/ldap.properties.dist" outFile="${idp.target.dir}/conf/ldap.properties" mergeFile="${ldap.merge.properties}" />
485
+    </target>
486
+
487
+    <target name="metadata-gen" depends="gettarget, getentityid, gethostname, genkeys, upgrade"  unless="idp.metadata.present">
488
+        <TGT>metadata-gen</TGT>
489
+        <mkdir dir="${idp.target.dir}/metadata"/>
490
+        <metadatagenerate dnsName="${idp.host.name}" idpHome="${idp.target.dir}" backChannelCert="${idp.target.dir}/credentials/idp-backchannel.crt" output="${idp.target.dir}/metadata/idp-metadata.xml"/>
491
+    </target>
492
+
493
+    <target name="handleeditwebapp" depends="makeeditwebapp, populateeditwebapp"/>
494
+
495
+    <target name="makeeditwebapp">
496
+        <TGT>makeeditwebapp</TGT>
497
+        <!-- Create edit-webapp tree -->
498
+        <mkdir dir="${idp.target.dir}/edit-webapp" />
499
+        <mkdir dir="${idp.target.dir}/edit-webapp/css" />
500
+        <mkdir dir="${idp.target.dir}/edit-webapp/images" />
501
+        <mkdir dir="${idp.target.dir}/edit-webapp/WEB-INF" />
502
+        <mkdir dir="${idp.target.dir}/edit-webapp/WEB-INF/lib" />
503
+        <mkdir dir="${idp.target.dir}/edit-webapp/WEB-INF/classes" />
504
+    </target>
505
+
506
+    <target name="populateeditwebapp" unless="idp.properties.present">
507
+        <TGT>populateeditwebapp</TGT>
508
+        <copy todir="${idp.target.dir}/edit-webapp/css" failonerror="false">
509
+            <fileset dir="${idp.target.dir}/webapp/css" />
510
+        </copy>
511
+        <copy todir="${idp.target.dir}/edit-webapp/images" failonerror="false">
512
+            <fileset dir="${idp.target.dir}/webapp/images" />
513
+        </copy>
514
+    </target>
515
+
516
+    <!--
517
+     CREATE WAR FILE
518
+    -->
519
+    <target name="build-war" depends="gettarget">
520
+        <!-- no logging -->
521
+        <echo>Rebuilding ${idp.target.dir}/war/idp.war ...</echo>
522
+        <copy todir="${idp.target.dir}/webapp" overwrite="true" failonerror="false">
523
+            <fileset dir="${idp.target.dir}/edit-webapp" />
524
+        </copy>
525
+        <!-- build a jar, not war, since it is already fully populated -->
526
+        <delete file="${idp.target.dir}/war/idp.war" failonerror="false" />
527
+        <jar destfile="${idp.target.dir}/war/idp.war" basedir="${idp.target.dir}/webapp" />
528
+        <echo>...done</echo>
529
+    </target>
530
+
531
+    <!-- specify getsource before get target to force target default-->
532
+    <target name="copy-distribution" depends="init, getsource, gettarget">
533
+        <TGT>copy-distribution</TGT>
534
+        <local name="target" />
535
+        <property name="target" value="${idp.target.dir}/old-${DSTAMP}-${TSTAMP}" />
536
+
537
+        <!-- Save old configuration:
538
+         NOT conf, credentials, flows, logs, messages, metadata, views-->
539
+        <mkdir dir="${target}" />
540
+
541
+        <!-- NOTE - move task appears to be very flaky - at least on windows.  This is why we
542
+         copy with a force overwrite and then explicitly delete -->
543
+        <copy todir="${target}/bin" failonerror="false">
544
+            <fileset dir="${idp.target.dir}/bin" />
545
+        </copy>
546
+        <copy todir="${target}/dist" failonerror="false">
547
+            <fileset dir="${idp.target.dir}/dist" />
548
+        </copy>
549
+        <copy todir="${target}/doc" failonerror="false">
550
+            <fileset dir="${idp.target.dir}/doc" />
551
+        </copy>
552
+        <copy todir="${target}/system" failonerror="false">
553
+            <fileset dir="${idp.target.dir}/system" />
554
+        </copy>
555
+        <copy todir="${target}/webapp" failonerror="false">
556
+            <fileset dir="${idp.target.dir}/webapp" />
557
+        </copy>
558
+
559
+        <!-- Do not delete bin, this preserves user scripts.
560
+        Delete bin/lib so as to clear up old jar files. -->
561
+        <delete dir="${idp.target.dir}/bin/lib" failonerror="false" />
562
+        <delete dir="${idp.target.dir}/dist" failonerror="false" />
563
+        <delete dir="${idp.target.dir}/doc" failonerror="false" />
564
+        <mkdir dir="${idp.target.dir}/system"/> <!-- create because it won't exist first time -->
565
+        <attrib readonly="false">
566
+            <fileset dir="${idp.target.dir}/system" includes="**/*"/>
567
+        </attrib>
568
+        <delete dir="${idp.target.dir}/system" failonerror="false" />
569
+        <delete dir="${idp.target.dir}/webapp" failonerror="false" />
570
+
571
+        <!-- Now copy or create empty as required.
572
+        Creating an existing file is benign, bin gets updated -->
573
+
574
+        <copy todir="${idp.target.dir}/bin" overwrite="true">
575
+            <fileset dir="${idp.src.dir}/bin"  excludes="**/ant-jetty.xml **/install.*"/>
576
+        </copy>
577
+        <mkdir dir="${idp.target.dir}/conf" />
578
+        <mkdir dir="${idp.target.dir}/credentials" />
579
+        <copy todir="${idp.target.dir}/dist">
580
+            <fileset dir="${idp.src.dir}/dist" />
581
+        </copy>
582
+        <mkdir dir="${idp.target.dir}/doc" />
583
+        <copy todir="${idp.target.dir}/doc">
584
+            <fileset dir="${idp.src.dir}/doc" />
585
+        </copy>
586
+
587
+        <mkdir dir="${idp.target.dir}/flows" />
588
+        <mkdir dir="${idp.target.dir}/logs" />
589
+        <mkdir dir="${idp.target.dir}/messages" />
590
+        <mkdir dir="${idp.target.dir}/metadata" />
591
+        <copy todir="${idp.target.dir}/system">
592
+            <fileset dir="${idp.src.dir}/system" />
593
+        </copy>
594
+        <mkdir dir="${idp.target.dir}/views" />
595
+        <mkdir dir="${idp.target.dir}/war" />
596
+        <mkdir dir="${idp.target.dir}/webapp" />
597
+        <copy todir="${idp.target.dir}/webapp">
598
+            <fileset dir="${idp.src.dir}/webapp" />
599
+        </copy>
600
+    </target>
601
+
602
+    <target name="copy-jetty-distribution" depends="copy-distribution" if="idp.jetty.config">
603
+        <TGT>copy-jetty-distribution</TGT>
604
+
605
+        <!-- save old -->
606
+        <local name="target" />
607
+        <property name="target" value="${idp.target.dir}/old-${DSTAMP}-${TSTAMP}" />
608
+
609
+        <!--- IDP-626 we do not need to preserve tmp -->
610
+        <delete failonerror="false"  dir="${idp.target.dir}/jetty-base/tmp"/>
611
+        <copy todir="${target}/jetty-base" failonerror="false">
612
+            <fileset dir="${idp.target.dir}/jetty-base" />
613
+        </copy>
614
+        <delete failonerror="false" dir="${idp.target.dir}/jetty-base"/>
615
+
616
+        <!-- Copy new -->
617
+        <copy todir="${idp.target.dir}/jetty-base">
618
+            <fileset dir="${idp.src.dir}/embedded/jetty-base" />
619
+        </copy>
620
+        <!-- rename Start.d -->
621
+        <move file="${idp.target.dir}/jetty-base/start.d" tofile="${idp.target.dir}/jetty-base/start.d.dist"/>
622
+        <!-- And restore the old one if present -->
623
+        <copy todir="${idp.target.dir}/jetty-base/start.d" failonerror="false">
624
+            <fileset dir="${target}/jetty-base/start.d" />
625
+        </copy>
626
+        <!-- finally copy the ant file -->
627
+        <copy file="${idp.src.dir}/bin/ant-jetty.xml" tofile="${idp.target.dir}/bin/ant-jetty.xml" overwrite="true"/>
628
+    </target>
629
+
630
+    <!-- V2 to V3 PrePopulate -->
631
+
632
+    <target name="v2v3prepopulate" depends="gettarget, v2detect" if="idp.is.V2">
633
+        <TGT>v2v3prepopulate</TGT>
634
+        <echo>
635
+A V2 Installation has been detected. Configuration will be preserved into
636
+.v2 folders and appropriate files copied forward.
637
+        </echo>
638
+        <!-- rename war to war.v2 -->
639
+        <copy todir="${idp.target.dir}/war.v2" failonerror="true">
640
+            <fileset dir="${idp.target.dir}/war" />
641
+        </copy>
642
+        <delete dir="${idp.target.dir}/war" failonerror="false" />
643
+
644
+        <!-- rename conf to conf.v2 -->
645
+        <copy todir="${idp.target.dir}/conf.v2" failonerror="true">
646
+            <fileset dir="${idp.target.dir}/conf" />
647
+        </copy>
648
+        <delete dir="${idp.target.dir}/conf" failonerror="false" />
649
+
650
+        <!-- delete old lib folder, just avoids confusion -->
651
+        <delete dir="${idp.target.dir}/lib" failonerror="false" />
652
+
653
+        <!-- copy selected files from conf.v2 -->
654
+        <mkdir dir="${idp.target.dir}/conf" />
655
+        <copy file="${idp.target.dir}/conf.v2/attribute-filter.xml" tofile="${idp.target.dir}/conf/attribute-filter.xml" failonerror="false" />
656
+        <copy file="${idp.target.dir}/conf.v2/attribute-resolver.xml" tofile="${idp.target.dir}/conf/attribute-resolver.xml" failonerror="false" />
657
+        <copy file="${idp.target.dir}/conf.v2/relying-party.xml" tofile="${idp.target.dir}/conf/metadata-providers.xml" failonerror="false" />
658
+        <copy file="${idp.target.dir}/conf.v2/relying-party.xml" tofile="${idp.target.dir}/conf/relying-party.xml" failonerror="false" />
659
+
660
+        <!-- Signal we're a legacy RP config -->
661
+        <echo file="${services.merge.properties}" append="yes">
662
+            idp.service.relyingparty.resources = shibboleth.LegacyRelyingPartyResolverResources
663
+        </echo>
664
+        <echo file="${nameid.merge.properties}" append="yes">
665
+            idp.nameid.saml2.legacyGenerator = shibboleth.LegacySAML2NameIDGenerator
666
+            idp.nameid.saml1.legacyGenerator = shibboleth.LegacySAML1NameIdentifierGenerator
667
+        </echo>
668
+    </target>
669
+
670
+    <target name="v2detect" depends="gettarget">
671
+        <TGT>v2detect</TGT>
672
+        <available property="idp.properties.present" file="${idp.target.dir}/conf/idp.properties" />
673
+        <available property="idp.relying.party.present" file="${idp.target.dir}/conf/relying-party.xml" />
674
+        <condition property="idp.is.V2">
675
+            <!-- This is V2 as there is relying-party.xml and not idp.properties -->
676
+            <and>
677
+                <isfalse value="${idp.properties.present}" />
678
+                <istrue value="${idp.relying.party.present}" />
679
+            </and>
680
+        </condition>
681
+    </target>
682
+
683
+    <target name="reprotect" depends="gettarget">
684
+        <!-- See IDP-487 -->
685
+        <chmod perm="755" dir="${idp.target.dir}/bin" includes="**/*.sh"/>
686
+        <chmod perm="600" dir="${idp.target.dir}/credentials" includes="**/*.key"/>
687
+        <chmod perm="${idp.conf.filemode}" dir="${idp.target.dir}/conf" includes="**/*"/>
688
+        <chmod perm="444" dir="${idp.target.dir}/system" includes="**/*"/>
689
+        <attrib readonly="true">
690
+            <fileset dir="${idp.target.dir}/system" includes="**/*"/>
691
+        </attrib>
692
+    </target>
693
+
694
+    <target name="tidy" unless="idp.no.tidy">
695
+        <TGT>tidy</TGT>
696
+        <delete file="${idp.merge.properties}" failonerror="false" />
697
+        <delete file="${services.merge.properties}" failonerror="false" />
698
+        <delete file="${nameid.merge.properties}" failonerror="false" />
699
+        <delete file="${ldap.merge.properties}" failonerror="false" />
700
+        <delete file="${idp.property.file}" failonerror="false" />
701
+    </target>
702
+
703
+</project>

+ 4
- 0
src/shibboleth-identity-provider-3.2.1/bin/install.bat View File

@@ -0,0 +1,4 @@
1
+@echo off
2
+setlocal
3
+
4
+"%~dp0\ant.bat" %* install

+ 8
- 0
src/shibboleth-identity-provider-3.2.1/bin/install.sh View File

@@ -0,0 +1,8 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+
5
+LOCATION=$0
6
+LOCATION=${LOCATION%/*}
7
+
8
+$LOCATION/ant.sh "$@" install

+ 4
- 0
src/shibboleth-identity-provider-3.2.1/bin/keygen.bat View File

@@ -0,0 +1,4 @@
1
+@echo off
2
+setlocal
3
+
4
+"%~dp0\runclass.bat" net.shibboleth.utilities.java.support.security.SelfSignedCertificateGenerator %*

+ 8
- 0
src/shibboleth-identity-provider-3.2.1/bin/keygen.sh View File

@@ -0,0 +1,8 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+
5
+LOCATION=$0
6
+LOCATION=${LOCATION%/*}
7
+
8
+$LOCATION/runclass.sh net.shibboleth.utilities.java.support.security.SelfSignedCertificateGenerator "$@"

BIN
src/shibboleth-identity-provider-3.2.1/bin/lib/ant-1.9.4.jar View File


BIN
src/shibboleth-identity-provider-3.2.1/bin/lib/ant-launcher-1.9.4.jar View File


BIN
src/shibboleth-identity-provider-3.2.1/bin/lib/bcpkix-jdk15on-1.53.jar View File


BIN
src/shibboleth-identity-provider-3.2.1/bin/lib/idp-installer-3.2.1.jar View File


BIN
src/shibboleth-identity-provider-3.2.1/bin/lib/jcommander-1.48.jar View File


+ 4
- 0
src/shibboleth-identity-provider-3.2.1/bin/reload-metadata.bat View File

@@ -0,0 +1,4 @@
1
+@echo off
2
+setlocal
3
+
4
+"%~dp0\runclass.bat" -Dnet.shibboleth.idp.cli.arguments=net.shibboleth.idp.cli.ReloadMetadataArguments net.shibboleth.idp.cli.CLI %*

+ 9
- 0
src/shibboleth-identity-provider-3.2.1/bin/reload-metadata.sh View File

@@ -0,0 +1,9 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+
5
+LOCATION=$0
6
+LOCATION=${LOCATION%/*}
7
+
8
+$LOCATION/runclass.sh -Dnet.shibboleth.idp.cli.arguments=net.shibboleth.idp.cli.ReloadMetadataArguments \
9
+    net.shibboleth.idp.cli.CLI "$@"

+ 4
- 0
src/shibboleth-identity-provider-3.2.1/bin/reload-service.bat View File

@@ -0,0 +1,4 @@
1
+@echo off
2
+setlocal
3
+
4
+"%~dp0\runclass.bat" -Dnet.shibboleth.idp.cli.arguments=net.shibboleth.idp.cli.ReloadServiceArguments net.shibboleth.idp.cli.CLI %*

+ 9
- 0
src/shibboleth-identity-provider-3.2.1/bin/reload-service.sh View File

@@ -0,0 +1,9 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+
5
+LOCATION=$0
6
+LOCATION=${LOCATION%/*}
7
+
8
+$LOCATION/runclass.sh -Dnet.shibboleth.idp.cli.arguments=net.shibboleth.idp.cli.ReloadServiceArguments \
9
+    net.shibboleth.idp.cli.CLI "$@"

+ 29
- 0
src/shibboleth-identity-provider-3.2.1/bin/runclass.bat View File

@@ -0,0 +1,29 @@
1
+@echo off
2
+setlocal
3
+
4
+REM We need a JVM
5
+if not defined JAVA_HOME  (
6
+  echo Error: JAVA_HOME is not defined.
7
+  exit /b
8
+)
9
+
10
+if not defined JAVACMD (
11
+  set JAVACMD="%JAVA_HOME%\bin\java.exe"
12
+)
13
+
14
+if not defined IDP_BASE_URL (
15
+  set IDP_BASE_URL="http://localhost/idp"
16
+)
17
+
18
+if not exist %JAVACMD% (
19
+  echo Error: JAVA_HOME is not defined correctly.
20
+  echo Cannot execute %JAVACMD%
21
+  exit /b
22
+)
23
+
24
+REM add in the dependency .jar files
25
+set LOCALCLASSPATH=%~dp0lib\*;%~dp0..\webapp\WEB-INF\lib\*;%JAVA_HOME%\lib\classes.zip;%CLASSPATH%
26
+
27
+REM Go to it !
28
+
29
+%JAVACMD% -cp "%LOCALCLASSPATH%" -Dnet.shibboleth.idp.cli.baseURL=%IDP_BASE_URL% %*

+ 50
- 0
src/shibboleth-identity-provider-3.2.1/bin/runclass.sh View File

@@ -0,0 +1,50 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+declare COMMAND
5
+declare JAVACMD
6
+declare LOCALCLASSPATH
7
+declare LIBDIR
8
+
9
+LOCATION=$0
10
+LOCATION=${LOCATION%/*}
11
+
12
+if [ -z "$JAVA_HOME" ] ; then
13
+  echo "ERROR: JAVA_HOME environment variable is not set."
14
+  exit 1
15
+else
16
+  if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
17
+    # IBM's JDK on AIX uses strange locations for the executables
18
+    JAVACMD=$JAVA_HOME/jre/sh/java
19
+  else
20
+    JAVACMD=$JAVA_HOME/bin/java
21
+  fi
22
+fi
23
+
24
+if [ ! -x "$JAVACMD" ] ; then
25
+  echo "Error: JAVA_HOME is not defined correctly."
26
+  echo "  We cannot execute $JAVACMD"
27
+  exit 1
28
+fi
29
+
30
+if [ -n "$CLASSPATH" ] ; then
31
+  LOCALCLASSPATH=$CLASSPATH
32
+fi
33
+
34
+if [ -z "$IDP_BASE_URL" ] ; then
35
+  IDP_BASE_URL="http://localhost/idp"
36
+fi
37
+
38
+# add in the dependency .jar files
39
+LOCALCLASSPATH="$LOCATION/../webapp/WEB-INF/lib/*":$LOCALCLASSPATH
40
+LOCALCLASSPATH="$LOCATION/lib/*":$LOCALCLASSPATH
41
+
42
+if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
43
+  LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
44
+fi
45
+
46
+if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
47
+  LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
48
+fi
49
+
50
+"$JAVACMD" '-classpath' "$LOCALCLASSPATH" -Dnet.shibboleth.idp.cli.baseURL=$IDP_BASE_URL "$@"

+ 4
- 0
src/shibboleth-identity-provider-3.2.1/bin/seckeygen.bat View File

@@ -0,0 +1,4 @@
1
+@echo off
2
+setlocal
3
+
4
+"%~dp0\runclass.bat" net.shibboleth.utilities.java.support.security.BasicKeystoreKeyStrategyTool %*

+ 8
- 0
src/shibboleth-identity-provider-3.2.1/bin/seckeygen.sh View File

@@ -0,0 +1,8 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+
5
+LOCATION=$0
6
+LOCATION=${LOCATION%/*}
7
+
8
+$LOCATION/runclass.sh net.shibboleth.utilities.java.support.security.BasicKeystoreKeyStrategyTool "$@"

+ 4
- 0
src/shibboleth-identity-provider-3.2.1/bin/status.bat View File

@@ -0,0 +1,4 @@
1
+@echo off
2
+setlocal
3
+
4
+"%~dp0\runclass.bat" -Dnet.shibboleth.idp.cli.arguments=net.shibboleth.idp.cli.StatusArguments net.shibboleth.idp.cli.CLI %*

+ 9
- 0
src/shibboleth-identity-provider-3.2.1/bin/status.sh View File

@@ -0,0 +1,9 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+
5
+LOCATION=$0
6
+LOCATION=${LOCATION%/*}
7
+
8
+$LOCATION/runclass.sh -Dnet.shibboleth.idp.cli.arguments=net.shibboleth.idp.cli.StatusArguments \
9
+    net.shibboleth.idp.cli.CLI "$@"

+ 4
- 0
src/shibboleth-identity-provider-3.2.1/bin/version.bat View File

@@ -0,0 +1,4 @@
1
+@echo off
2
+setlocal
3
+
4
+"%~dp0\runclass.bat" net.shibboleth.idp.Version

+ 8
- 0
src/shibboleth-identity-provider-3.2.1/bin/version.sh View File

@@ -0,0 +1,8 @@
1
+#! /bin/bash
2
+
3
+declare LOCATION
4
+
5
+LOCATION=$0
6
+LOCATION=${LOCATION%/*}
7
+
8
+$LOCATION/runclass.sh net.shibboleth.idp.Version

+ 32
- 0
src/shibboleth-identity-provider-3.2.1/conf/access-control.xml View File

@@ -0,0 +1,32 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<beans xmlns="http://www.springframework.org/schema/beans"
3
+       xmlns:context="http://www.springframework.org/schema/context"
4
+       xmlns:util="http://www.springframework.org/schema/util"
5
+       xmlns:p="http://www.springframework.org/schema/p"
6
+       xmlns:c="http://www.springframework.org/schema/c"
7
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
9
+                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
10
+                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
11
+                           
12
+       default-init-method="initialize"
13
+       default-destroy-method="destroy">
14
+
15
+    <!-- Map of access control policies used to limit access to administrative functions. -->
16
+
17
+    <!--
18
+    The only built-in implementation of the AccessControl interface is IP-based, as below.
19
+    The ranges provided MUST be CIDR network expressions. To specify a single address,
20
+    add "/32" or "/128" for IPv4 or IPv6 respectively.
21
+    -->
22
+
23
+    <util:map id="shibboleth.AccessControlPolicies">
24
+    
25
+        <entry key="AccessByIPAddress">
26
+            <bean parent="shibboleth.IPRangeAccessControl"
27
+                p:allowedRanges="#{ {'127.0.0.1/32', '::1/128'} }" />
28
+        </entry>
29
+    
30
+    </util:map>
31
+
32
+</beans>

+ 45
- 0
src/shibboleth-identity-provider-3.2.1/conf/attribute-filter.xml View File

@@ -0,0 +1,45 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!-- 
3
+    This file is an EXAMPLE policy file.  While the policy presented in this 
4
+    example file is illustrative of some simple cases, it relies on the names of
5
+    non-existent example services and the example attributes demonstrated in the
6
+    default attribute-resolver.xml file.
7
+    
8
+    Deployers should refer to the documentation for a complete list of components
9
+    and their options.
10
+-->
11
+<AttributeFilterPolicyGroup id="ShibbolethFilterPolicy"
12
+        xmlns="urn:mace:shibboleth:2.0:afp"
13
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14
+        xsi:schemaLocation="urn:mace:shibboleth:2.0:afp http://shibboleth.net/schema/idp/shibboleth-afp.xsd">
15
+
16
+    <!-- Release some attributes to an SP. -->
17
+    <AttributeFilterPolicy id="example1">
18
+        <PolicyRequirementRule xsi:type="Requester" value="https://sp.example.org" />
19
+
20
+        <AttributeRule attributeID="eduPersonPrincipalName">
21
+            <PermitValueRule xsi:type="ANY" />
22
+        </AttributeRule>
23
+
24
+        <AttributeRule attributeID="uid">
25
+            <PermitValueRule xsi:type="ANY" />
26
+        </AttributeRule>
27
+
28
+        <AttributeRule attributeID="mail">
29
+            <PermitValueRule xsi:type="ANY" />
30
+        </AttributeRule>
31
+    </AttributeFilterPolicy>
32
+
33
+    <!-- Release eduPersonAffiliation to two specific SPs. -->
34
+    <AttributeFilterPolicy id="example2">
35
+        <PolicyRequirementRule xsi:type="OR">
36
+            <Rule xsi:type="Requester" value="https://sp.example.org" />
37
+            <Rule xsi:type="Requester" value="https://another.example.org/shibboleth" />
38
+        </PolicyRequirementRule>
39
+
40
+        <AttributeRule attributeID="eduPersonScopedAffiliation">
41
+            <PermitValueRule xsi:type="ANY" />
42
+        </AttributeRule>
43
+    </AttributeFilterPolicy>
44
+
45
+</AttributeFilterPolicyGroup>

+ 295
- 0
src/shibboleth-identity-provider-3.2.1/conf/attribute-resolver-full.xml View File

@@ -0,0 +1,295 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!-- 
3