diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 97300a9..7773221 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -26,6 +26,8 @@ dependencies { implementation("org.springframework:spring-core") implementation 'org.asciidoctor:asciidoctor-gradle-jvm:3.3.2' implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:4.29.0' + implementation 'org.antora:gradle-antora-plugin:1.0.0' + implementation 'io.spring.gradle.antora:spring-antora-plugin:0.0.1' } gradlePlugin { @@ -38,6 +40,10 @@ gradlePlugin { id = "org.springframework.security.kerberos.bom" implementationClass = "org.springframework.security.kerberos.gradle.BomPlugin" } + docsPlugin { + id = "org.springframework.security.kerberos.docs" + implementationClass = "org.springframework.security.kerberos.gradle.DocsPlugin" + } distPlugin { id = "org.springframework.security.kerberos.root" implementationClass = "org.springframework.security.kerberos.gradle.RootPlugin" diff --git a/buildSrc/src/main/java/org/springframework/security/kerberos/gradle/DocsPlugin.java b/buildSrc/src/main/java/org/springframework/security/kerberos/gradle/DocsPlugin.java new file mode 100644 index 0000000..2428789 --- /dev/null +++ b/buildSrc/src/main/java/org/springframework/security/kerberos/gradle/DocsPlugin.java @@ -0,0 +1,86 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.security.kerberos.gradle; + +import java.util.HashMap; +import java.util.Map; + +import org.antora.gradle.AntoraPlugin; +import org.gradle.api.Action; +import org.gradle.api.Plugin; +import org.gradle.api.Project; +import org.gradle.api.Task; +import org.gradle.api.plugins.JavaLibraryPlugin; +import org.gradle.api.plugins.JavaPlugin; +import org.gradle.api.plugins.PluginManager; +import org.gradle.api.publish.tasks.GenerateModuleMetadata; + +import io.spring.gradle.antora.GenerateAntoraYmlPlugin; +import io.spring.gradle.antora.GenerateAntoraYmlTask; + +/** + * @author Janne Valkealahti + */ +class DocsPlugin implements Plugin { + + @Override + public void apply(Project project) { + PluginManager pluginManager = project.getPluginManager(); + pluginManager.apply(JavaPlugin.class); + pluginManager.apply(JavaLibraryPlugin.class); + pluginManager.apply(ManagementConfigurationPlugin.class); + pluginManager.apply(SpringMavenPlugin.class); + pluginManager.apply(AntoraPlugin.class); + pluginManager.apply(GenerateAntoraYmlPlugin.class); + + ExtractVersionConstraints dependencyVersions = project.getTasks().create("dependencyVersions", + ExtractVersionConstraints.class, task -> { + task.enforcedPlatform(":spring-security-kerberos-management"); + }); + + configureYmlPlugins(project, dependencyVersions); + + project.getTasks().withType(GenerateModuleMetadata.class, metadata -> { + metadata.setEnabled(false); + }); + } + + private void configureYmlPlugins(Project project, ExtractVersionConstraints dependencyVersions) { + project.getPlugins().withType(GenerateAntoraYmlPlugin.class, (ymlPlugin) -> { + project.getTasks().withType(GenerateAntoraYmlTask.class, (ymlTask) -> { + ymlTask.dependsOn(dependencyVersions); + configureHtmlOnlyAttributes(project, ymlTask, dependencyVersions); + }); + }); + } + + private void configureHtmlOnlyAttributes(Project project, GenerateAntoraYmlTask ymlTask, + ExtractVersionConstraints dependencyVersions) { + + ymlTask.doFirst(new Action() { + + @Override + public void execute(Task arg0) { + Map versionConstraints = dependencyVersions.getVersionConstraints(); + Map attrs = new HashMap<>(); + attrs.put("version", project.getVersion()); + attrs.put("spring-version", versionConstraints.get("org.springframework:spring-core")); + attrs.put("spring-security-version", versionConstraints.get("org.springframework.security:spring-security-core")); + ymlTask.getAsciidocAttributes().putAll(attrs); + } + }); + } +} \ No newline at end of file diff --git a/docs/src/api/overview.html b/docs/src/api/overview.html deleted file mode 100644 index 805921e..0000000 --- a/docs/src/api/overview.html +++ /dev/null @@ -1,14 +0,0 @@ - - -This document is the API specification for the Spring Security Kerberos project. -
- -
-

- For further API reference and developer documentation, see the - Spring Security Kerberos Project Page. - There you can find the latest news, links to documentation, books, presentations and webinars. -

-
- - diff --git a/docs/src/api/stylesheet.css b/docs/src/api/stylesheet.css deleted file mode 100644 index 029c89c..0000000 --- a/docs/src/api/stylesheet.css +++ /dev/null @@ -1,599 +0,0 @@ -/* Javadoc style sheet */ -/* -Overall document style -*/ - -@import url('resources/fonts/dejavu.css'); - -body { - background-color:#ffffff; - color:#353833; - font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; - font-size:14px; - margin:0; -} -a:link, a:visited { - text-decoration:none; - color:#4A6782; -} -a:hover, a:focus { - text-decoration:none; - color:#bb7a2a; -} -a:active { - text-decoration:none; - color:#4A6782; -} -a[name] { - color:#353833; -} -a[name]:hover { - text-decoration:none; - color:#353833; -} -pre { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; -} -h1 { - font-size:20px; -} -h2 { - font-size:18px; -} -h3 { - font-size:16px; - font-style:italic; -} -h4 { - font-size:13px; -} -h5 { - font-size:12px; -} -h6 { - font-size:11px; -} -ul { - list-style-type:disc; -} -code, tt { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; - padding-top:4px; - margin-top:8px; - line-height:1.4em; -} -dt code { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; - padding-top:4px; -} -table tr td dt code { - font-family:'DejaVu Sans Mono', monospace; - font-size:14px; - vertical-align:top; - padding-top:4px; -} -sup { - font-size:8px; -} -/* -Document title and Copyright styles -*/ -.clear { - clear:both; - height:0px; - overflow:hidden; -} -.aboutLanguage { - float:right; - padding:0px 21px; - font-size:11px; - z-index:200; - margin-top:-9px; -} -.legalCopy { - margin-left:.5em; -} -.bar a, .bar a:link, .bar a:visited, .bar a:active { - color:#FFFFFF; - text-decoration:none; -} -.bar a:hover, .bar a:focus { - color:#bb7a2a; -} -.tab { - background-color:#0066FF; - color:#ffffff; - padding:8px; - width:5em; - font-weight:bold; -} -/* -Navigation bar styles -*/ -.bar { - background-color:#4D7A97; - color:#FFFFFF; - padding:.8em .5em .4em .8em; - height:auto;/*height:1.8em;*/ - font-size:11px; - margin:0; -} -.topNav { - background-color:#4D7A97; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - height:2.8em; - padding-top:10px; - overflow:hidden; - font-size:12px; -} -.bottomNav { - margin-top:10px; - background-color:#4D7A97; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - height:2.8em; - padding-top:10px; - overflow:hidden; - font-size:12px; -} -.subNav { - background-color:#dee3e9; - float:left; - width:100%; - overflow:hidden; - font-size:12px; -} -.subNav div { - clear:left; - float:left; - padding:0 0 5px 6px; - text-transform:uppercase; -} -ul.navList, ul.subNavList { - float:left; - margin:0 25px 0 0; - padding:0; -} -ul.navList li{ - list-style:none; - float:left; - padding: 5px 6px; - text-transform:uppercase; -} -ul.subNavList li{ - list-style:none; - float:left; -} -.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { - color:#FFFFFF; - text-decoration:none; - text-transform:uppercase; -} -.topNav a:hover, .bottomNav a:hover { - text-decoration:none; - color:#bb7a2a; - text-transform:uppercase; -} -.navBarCell1Rev { - background-color:#F8981D; - color:#253441; - margin: auto 5px; -} -.skipNav { - position:absolute; - top:auto; - left:-9999px; - overflow:hidden; -} -/* -Page header and footer styles -*/ -.header, .footer { - clear:both; - margin:0 20px; - padding:5px 0 0 0; -} -.indexHeader { - margin:10px; - position:relative; -} -.indexHeader span{ - margin-right:15px; -} -.indexHeader h1 { - font-size:13px; -} -.title { - color:#2c4557; - margin:10px 0; -} -.subTitle { - margin:5px 0 0 0; -} -.header ul { - margin:0 0 15px 0; - padding:0; -} -.footer ul { - margin:20px 0 5px 0; -} -.header ul li, .footer ul li { - list-style:none; - font-size:13px; -} -/* -Heading styles -*/ -div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { - background-color:#dee3e9; - border:1px solid #d0d9e0; - margin:0 0 6px -8px; - padding:7px 5px; -} -ul.blockList ul.blockList ul.blockList li.blockList h3 { - background-color:#dee3e9; - border:1px solid #d0d9e0; - margin:0 0 6px -8px; - padding:7px 5px; -} -ul.blockList ul.blockList li.blockList h3 { - padding:0; - margin:15px 0; -} -ul.blockList li.blockList h2 { - padding:0px 0 20px 0; -} -/* -Page layout container styles -*/ -.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { - clear:both; - padding:10px 20px; - position:relative; -} -.indexContainer { - margin:10px; - position:relative; - font-size:12px; -} -.indexContainer h2 { - font-size:13px; - padding:0 0 3px 0; -} -.indexContainer ul { - margin:0; - padding:0; -} -.indexContainer ul li { - list-style:none; - padding-top:2px; -} -.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { - font-size:12px; - font-weight:bold; - margin:10px 0 0 0; - color:#4E4E4E; -} -.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { - margin:5px 0 10px 0px; - font-size:14px; - font-family:'DejaVu Sans Mono',monospace; -} -.serializedFormContainer dl.nameValue dt { - margin-left:1px; - font-size:1.1em; - display:inline; - font-weight:bold; -} -.serializedFormContainer dl.nameValue dd { - margin:0 0 0 1px; - font-size:1.1em; - display:inline; -} -/* -List styles -*/ -ul.horizontal li { - display:inline; - font-size:0.9em; -} -ul.inheritance { - margin:0; - padding:0; -} -ul.inheritance li { - display:inline; - list-style:none; -} -ul.inheritance li ul.inheritance { - margin-left:15px; - padding-left:15px; - padding-top:1px; -} -ul.blockList, ul.blockListLast { - margin:10px 0 10px 0; - padding:0; -} -ul.blockList li.blockList, ul.blockListLast li.blockList { - list-style:none; - margin-bottom:15px; - line-height:1.4; -} -ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { - padding:0px 20px 5px 10px; - border:1px solid #ededed; - background-color:#f8f8f8; -} -ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { - padding:0 0 5px 8px; - background-color:#ffffff; - border:none; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { - margin-left:0; - padding-left:0; - padding-bottom:15px; - border:none; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { - list-style:none; - border-bottom:none; - padding-bottom:0; -} -table tr td dl, table tr td dl dt, table tr td dl dd { - margin-top:0; - margin-bottom:1px; -} -/* -Table styles -*/ -.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { - width:100%; - border-left:1px solid #EEE; - border-right:1px solid #EEE; - border-bottom:1px solid #EEE; -} -.overviewSummary, .memberSummary { - padding:0px; -} -.overviewSummary caption, .memberSummary caption, .typeSummary caption, -.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { - position:relative; - text-align:left; - background-repeat:no-repeat; - color:#253441; - font-weight:bold; - clear:none; - overflow:hidden; - padding:0px; - padding-top:10px; - padding-left:1px; - margin:0px; - white-space:pre; -} -.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, -.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, -.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, -.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, -.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, -.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, -.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, -.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { - color:#FFFFFF; -} -.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, -.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - padding-bottom:7px; - display:inline-block; - float:left; - background-color:#F8981D; - border: none; - height:16px; -} -.memberSummary caption span.activeTableTab span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - margin-right:3px; - display:inline-block; - float:left; - background-color:#F8981D; - height:16px; -} -.memberSummary caption span.tableTab span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - margin-right:3px; - display:inline-block; - float:left; - background-color:#4D7A97; - height:16px; -} -.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { - padding-top:0px; - padding-left:0px; - padding-right:0px; - background-image:none; - float:none; - display:inline; -} -.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, -.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { - display:none; - width:5px; - position:relative; - float:left; - background-color:#F8981D; -} -.memberSummary .activeTableTab .tabEnd { - display:none; - width:5px; - margin-right:3px; - position:relative; - float:left; - background-color:#F8981D; -} -.memberSummary .tableTab .tabEnd { - display:none; - width:5px; - margin-right:3px; - position:relative; - background-color:#4D7A97; - float:left; - -} -.overviewSummary td, .memberSummary td, .typeSummary td, -.useSummary td, .constantsSummary td, .deprecatedSummary td { - text-align:left; - padding:0px 0px 12px 10px; - width:100%; -} -th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, -td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ - vertical-align:top; - padding-right:0px; - padding-top:8px; - padding-bottom:3px; -} -th.colFirst, th.colLast, th.colOne, .constantsSummary th { - background:#dee3e9; - text-align:left; - padding:8px 3px 3px 7px; -} -td.colFirst, th.colFirst { - white-space:nowrap; - font-size:13px; -} -td.colLast, th.colLast { - font-size:13px; -} -td.colOne, th.colOne { - font-size:13px; -} -.overviewSummary td.colFirst, .overviewSummary th.colFirst, -.overviewSummary td.colOne, .overviewSummary th.colOne, -.memberSummary td.colFirst, .memberSummary th.colFirst, -.memberSummary td.colOne, .memberSummary th.colOne, -.typeSummary td.colFirst{ - width:25%; - vertical-align:top; -} -td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { - font-weight:bold; -} -.tableSubHeadingColor { - background-color:#EEEEFF; -} -.altColor { - background-color:#FFFFFF; -} -.rowColor { - background-color:#EEEEEF; -} -/* -Content styles -*/ -.description pre { - margin-top:0; -} -.deprecatedContent { - margin:0; - padding:10px 0; -} -.docSummary { - padding:0; -} - -ul.blockList ul.blockList ul.blockList li.blockList h3 { - font-style:normal; -} - -div.block { - font-size:14px; - font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; -} - -td.colLast div { - padding-top:0px; -} - - -td.colLast a { - padding-bottom:3px; -} -/* -Formatting effect styles -*/ -.sourceLineNo { - color:green; - padding:0 30px 0 0; -} -h1.hidden { - visibility:hidden; - overflow:hidden; - font-size:10px; -} -.block { - display:block; - margin:3px 10px 2px 0px; - color:#474747; -} -.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, -.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, -.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { - font-weight:bold; -} -.deprecationComment, .emphasizedPhrase, .interfaceName { - font-style:italic; -} - -div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, -div.block div.block span.interfaceName { - font-style:normal; -} - -div.contentContainer ul.blockList li.blockList h2{ - padding-bottom:0px; -} - - - -/* -Spring -*/ - -pre.code { - background-color: #F8F8F8; - border: 1px solid #CCCCCC; - border-radius: 3px 3px 3px 3px; - overflow: auto; - padding: 10px; - margin: 4px 20px 2px 0px; -} - -pre.code code, pre.code code * { - font-size: 1em; -} - -pre.code code, pre.code code * { - padding: 0 !important; - margin: 0 !important; -} - diff --git a/docs/src/info/changelog.txt b/docs/src/info/changelog.txt deleted file mode 100644 index 7762c75..0000000 --- a/docs/src/info/changelog.txt +++ /dev/null @@ -1,3 +0,0 @@ -SPRING SECURITY KERBEROS CHANGELOG -================================== - diff --git a/docs/src/info/license.txt b/docs/src/info/license.txt deleted file mode 100644 index 20e4bd8..0000000 --- a/docs/src/info/license.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/docs/src/info/notice.txt b/docs/src/info/notice.txt deleted file mode 100644 index da521ed..0000000 --- a/docs/src/info/notice.txt +++ /dev/null @@ -1,21 +0,0 @@ -====================================================================== -== NOTICE file corresponding to section 4 d of the Apache License, == -== Version 2.0, for the Spring Framework distribution. == -====================================================================== - -This product includes software developed by -the Apache Software Foundation (http://www.apache.org). - -The end-user documentation included with a redistribution, if any, -must include the following acknowledgement: - - "This product includes software developed by the Spring Framework - Project (http://www.springframework.org)." - -Alternately, this acknowledgement may appear in the software itself, -if and wherever such third-party acknowledgements normally appear. - -The names "Spring", "Spring Framework" and "Spring Security Kerberos" -must not be used to endorse or promote products derived from this -software without prior written permission. For written permission, -please contact enquiries@springsource.com. diff --git a/docs/src/info/readme.txt b/docs/src/info/readme.txt deleted file mode 100644 index dcdaca2..0000000 --- a/docs/src/info/readme.txt +++ /dev/null @@ -1,24 +0,0 @@ -SPRING SECURITY KERBEROS ------------------------- -http://projects.spring.io/spring-security-kerberos/ - -1. INTRODUCTION - -Spring Statemachine is a framework extension introducing state machine -concepts in a spring world. - -2. RELEASE NOTES - -This release comes with complete reference documentation. For further -details, consult the provided javadoc for specific packages and classes. - -3. DISTRIBUTION JAR FILES - -The Spring Statemachine jars files can be found in the 'dist' directory. - -4. GETTING STARTED - -Please see the reference documentation. -Additionally the blog at http://blog.spring.io as well -as sections of interest in the reference documentation. - diff --git a/docs/src/reference/asciidoc/index-docinfo.xml b/docs/src/reference/asciidoc/index-docinfo.xml deleted file mode 100644 index 154b7b0..0000000 --- a/docs/src/reference/asciidoc/index-docinfo.xml +++ /dev/null @@ -1,22 +0,0 @@ -{revnumber} -Spring Security Kerberos - - - Janne - Valkealahti - Pivotal - - - - - 2015 - Pivotal Software, Inc. - - - - Copies of this document may be made for your own use and for - distribution to others, provided that you do not charge any fee for such - copies and further provided that each copy contains this Copyright - Notice, whether distributed in print or electronically. - - diff --git a/docs/src/reference/asciidoc/index.adoc b/docs/src/reference/asciidoc/index.adoc deleted file mode 100644 index 6b62e80..0000000 --- a/docs/src/reference/asciidoc/index.adoc +++ /dev/null @@ -1,21 +0,0 @@ -:java-ClassLoader: http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html -:core-ApplicationContext: http://docs.spring.io/spring/docs/{spring-version}/javadoc-api/org/springframework/context/ApplicationContext.html -:core-beans-factory-placeholderconfigurer: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/beans.html#beans-factory-placeholderconfigurer -:core-beans-environment: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/beans.html#beans-environment -:core-ResourcePatternResolver: http://docs.spring.io/spring/docs/{spring-version}/javadoc-api/org/springframework/core/io/support/ResourcePatternResolver.html -:core-ref-util: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/xsd-config.html#xsd-config-body-schemas-util-properties -:core-aop-schema-advisors: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/aop.html#aop-schema-advisors -:core-dao: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/dao.html -:core-dao-exceptions: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/dao.html#dao-exceptions -:core-jdbc: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/jdbc.html -:core-jdbc-JdbcTemplate: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/jdbc.html#jdbc-JdbcTemplate - -= Spring Security Kerberos - Reference Documentation - -include::preface.adoc[] -include::introduction.adoc[] - -[[springandssk]] -include::ssk.adoc[] -include::samples.adoc[] -include::appendix.adoc[] diff --git a/docs/src/reference/asciidoc/preface.adoc b/docs/src/reference/asciidoc/preface.adoc deleted file mode 100644 index e3e756d..0000000 --- a/docs/src/reference/asciidoc/preface.adoc +++ /dev/null @@ -1,15 +0,0 @@ -[preface] -== Preface - -This reference documentations contains following parts. - -<> introduction to this reference documentation - -<> describes the usage of Spring Security -Kerberos - -<> describes the usage of Spring -Security Kerberos Samples - -<> generic support material - diff --git a/docs/src/reference/asciidoc/samples/.gitignore b/docs/src/reference/asciidoc/samples/.gitignore deleted file mode 100644 index b305868..0000000 --- a/docs/src/reference/asciidoc/samples/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.java -*.xml diff --git a/docs/src/reference/models/drawio-kerb-cc1.xml b/docs/src/reference/models/drawio-kerb-cc1.xml deleted file mode 100644 index bcbc3ba..0000000 --- a/docs/src/reference/models/drawio-kerb-cc1.xml +++ /dev/null @@ -1 +0,0 @@ -3ZjNjpswEMefJsdGfOXr2CTbrdRWqpTDHisDE7BqMDJmk+zT7xiGDQTaPYSE1V4i+M94PP55Mhgm7iY5PiqWxb9kCGLiWOFx4m4njjNzZ/hrhFMlLL15JUSKh5Vkn4UdfwESLVILHkLectRSCs2zthjINIVAt7S9FO0pMhbV4c/CLmCiqz7xUMeUskMpG/078Ciup7Hnq8qS61MdI4Q9K4T+UkpoM+aE1bHKVbkPCExJiWHMVXLcgDDQaiDV0r/9w/qWpIKUEvn/AMr+mYmCcuwk/QxKc+Twk/kgfsucay5TNPlSa5lM3HWsE4H3Nl7Wvl8Fj4yPlhmqecwyEyw5RqYOpuylUDANZJIVGhQ6KMB0jFsoD+hH29tcBS3MxAcqn1KiVT2CTECrE7qQ1bHdagjVlr2kYjucN29GE8WNffPIjVEJRW+RzxTxgkD2Q12MBzVkmvksR8PaL2cflqo991pUl3TbgOoupoSwibVGfQ1W+j+NgTUHhe43guoQL2K6ogANprbVg7TuntcgrTvpGExZEECe/8HmrJXEAOtIAeCggSu2rjyiW8N+pw0MUa82sRy1YG8C1b2AeteSpb7+IUr2Fu3AHa9gqZt/CLQ3OBOsxiNLU33ePutZ7fPWPeGOeIi9R9k6i+XFUZai3oNt9yz7A0xuW55rxf2i5OhYG1wePm8useMKMZkmXEZQg2pAl3bCw9AMXx9irmGXscDEOiBz1CR670VJNka/soz3XIiNFBKDbVOZlv0YN+MvtMTBj2m22z372rOehx69gV23DVQBjW14Ah+FXfWcf597D5JedMPvzyDnjYuXuT72FpXq4Oy77x0bwc1iPjl1x7to6V6378yHgY63528epa3xxch9eAU= \ No newline at end of file diff --git a/docs/src/reference/models/drawio-kerb-cc2.xml b/docs/src/reference/models/drawio-kerb-cc2.xml deleted file mode 100644 index eb1a30a..0000000 --- a/docs/src/reference/models/drawio-kerb-cc2.xml +++ /dev/null @@ -1 +0,0 @@ -3Zlbb+o4EMc/DY+LSMKtj4X2dKXdlSpRqec8VSYxibUOjhynQD99x8mYXGmpSEjVJ8h4Mh7//Gc8CQNnGe4fJImC/4RH+cAeefuBczewbWtmWfChLYfMMptPM4MvmYdOuWHF3igaR2hNmEfjkqMSgisWlY2u2G6pq0q2jeDlKSLim/C5YeUSXrc+M08FmXVuY8ra/jdlfmCmsaY32UisDiaGRzck4eqv1ARjejgkJla6KuceiEkhIIz+Fu6XlGtqBki29F8nRo9JSrrFRD6+AbN/JTzBHGtJv1KpGHD4l6wpfxQxU0xsYWgtlBLhwFkEKuRwbcFX43vLma99lIjAGgck0sHCva+FMCRviaRDV4RRoqgEB0khHe3miR344fYWV4EL0/Gp0c8RFwiMipAqeQAXHLUtJ7sFtWXNJ9n1Lt+8CU4UFPZtjG4EJeQfI+cU4QuCbIY66w+qRxRZkxgGFut09napWtNxieocLwtQndkQERaxGtSXYMXfUx9YYyrBvSOoNvJCpjcYoMDUGjUgdVpQqqmkfTAlrkvj+AWKs5ICAix8SSnc1LJijfKQroH9SRloQ68WsuxVsJ1AdSpQrypZrOvfQrJdlAOnP8FiNf8WaDvoCW76I4tT/dw6Ox6V+61rwu2xib2GbOG5qNLKYtRrsK33sv9Qndsdi5Vk6yTlaI+WsDw4b6rYYYWQTBEuQahudkOddsg8T9++2AVM0VVEXB1rB8zBJsB7w1OyAfilMt4wzpeCCwh2txXbtB7DZvxPS8bW2zTLqfe+1qTh0MMnsMu2ARVQ2IZnugbDKjvnP+fegKQRXfv700q/UXmYa2I/Qqm2zr7+3LHkTC/mh1O3x5WSPq7XnWlH0E0J76Omw/7QF+ByopbXADZgPs0UxWSQmsaggHTc2QO03WPrfISatsyXg3SqbbJR3XVIntEpUw/eH+Il5Wuxu88Ni9Sgf69CsjdoHojuHejWu5UytbucxDFzy7yzKXTcj6FBGiKRaYXIX/EpIn2KXqkI62jP7Cck5USx13ISTTRxhkfBdLHM3yGVd84ybbkJkSWPdxXfXVYCmR0/dpyVONmKa3EAMdGrNW6Rdogb8jX5Yb65NLIIuVCOCM/Tzhnt6lnaMT+/M5QD+pCH37qGDcewY2j4kxY1vHikksEq9OljKt1XlYZnQVFpWcnpS2rVZ+njy6CvSm1iXpRVq01bWjvxYsWatay9073M6DaBHfn+Lc1Fp4bp5cw2TuvHb1cdjZFiAf3Tw9NPB+5UizQKugPicJn/b5b9NvK/HZ37dw== \ No newline at end of file diff --git a/docs/src/reference/models/drawio-kerb-cc3.xml b/docs/src/reference/models/drawio-kerb-cc3.xml deleted file mode 100644 index d099ec0..0000000 --- a/docs/src/reference/models/drawio-kerb-cc3.xml +++ /dev/null @@ -1 +0,0 @@ -3Zlbb7M4EIZ/TS6/KEBOvfySdrvS7kqVUqm7V5UDE7BqYmScJumv7xjG4ZS2WZWEKndhGAb78cvw4vS8eby7VyyJ/pEBiJ47CHY977bnus5o7PVH+MPE9nlsPKJAqHhAaUVgwd+AggOKbngAaSVRSyk0T6pBX67X4OtKbCVF9RYJC235IrDwmWhGn3igozw6dcdF/E/gYWRv44xv8jOp3tsaAazYRuhfWQjPmdMxs7WyWXl3yExJiWXMr3g3B2G4WSD51P/44OxhkArWNJDPL6DRvzKxoTE2Bv0KSnPk8DdbgniQKddcrvHUUmot4543i3Qs8NjBnzb3t+ChydEywWgascQUi3ehkUKfvW0U9H0ZJxsNChMU4HBMWiC3mEfLW54FTczUB6ugAy6UGMgYtNpjCp11HS+/hLTlTElb22LxRnSjqLRuQ0pjJKHwULmgiD8I5HGok+6gBkyzJUvxxGyZ3b1dqs54WKE6pcMSVG9iH+syVov6O1jpeeoCawoK088E1SVexPSGCpSYOoMjSL0WlGo7aRdMme9Dmj5jc9ZKYoFZqADwopYVa5VHdC3sL9pAG3p1iGWngj0LVK8G9aKSpb7+IyR7jnbgdSdY6uY/Au0ZPMFNd2TpVtfbZ4eDqt+6JNwOTewlZOtOpjUrS1UvwbbpZf8CM7ZbnmrFl5uMozuY4/TwfVPHjjPEwZThMoLq5xc0acc8CMzls23ENSwS5ptaW2SOMYnZK5GRjTAvk/GKCzGXQmKx27VcZ/0YF+MFKsHWbZrjNb2vYz9gy8tAX2DfWwZSQGkZnmCJgUX+nv+a+xEkR9G1vz6t+I3ax9wx9gOSauvsm98dc8HNZK6cujustfRhs++MzwTdtvAuejquDzwjl9zdtcCRBGQxWjNQwjg820ez26FdPoDMHUcLfaDuja3ULoPyBHsMAW4a0iGIpdzeFYFZFjAPqVT8DR0DM4YB1sFvpbK4L1iacr8K/ENsqdyorAsU23iaqRAoi0RnBvQp2hNNhALBNH+tboYeo0l3eJDcdMhi46i6co714rZEPhu6qrxhWStkV/xgM2t1cgSNOoiYmdnatMQkpEfGa8dH4y2kkVcohHJAeJp2TvCoJ2nHPn8nKAcFo/b/GhPaH+KKUeC/zJXSwQMojrMwr5xPrGpZadTvy0qzLeaHSK3+AX3YAfq/UhvZ3bF6t2lLax/spjiTlrXXNDCP94/X7l6sbbOLN26+dc9lXqwAS8CNT+c4a3fwyP0XfHKu3bHX/n5xSdNl/PYz9pv48bD4vyx/PIo/HL27dw== \ No newline at end of file diff --git a/docs/src/reference/models/drawio-kerb-cc4.xml b/docs/src/reference/models/drawio-kerb-cc4.xml deleted file mode 100644 index 42be8e1..0000000 --- a/docs/src/reference/models/drawio-kerb-cc4.xml +++ /dev/null @@ -1 +0,0 @@ -3Zhbb+o4EIB/DY8HkQuXPhba7Uq7R6rEkbrnqTLJkFh1cOSYAv31HSfj5ganXTWQqk8k4/F4/M1kGHvgLZL9nWJp/FOGIAbuKNwPvJuB60696XCMv0Z0KESTMQkixcNC5JSCJX8BEo5IuuUhZDVFLaXQPK0LA7nZQKBrsrUU9SVSFlnzpWAZMNGWPvBQx4V05k5K+d/Ao9gu40yuipFMH6yNENZsK/SPXIRjZjhh1la+K+8WkSkp0Yx5SvYLEAabBVJs/a8To29OKtiQI3+eQN4/M7ElH1tOP4PSHDn8y1Yg7mXGNZcbHFpJrWUy8OaxTgS+O/hoda8Fj4yOlilKs5ilxliyj0wmDNnLVsEwkEm61aBQQQG6Y9RCuUM9Cm91F7QxYx8ogXIR7eoOZAJaHVCFRl3HK6ZQbjkzyq1dGbwxLRRX4uaTGqMUit4slxTxgUAehzrtD2rINFuxDAfmq3z1bqk6E79GdUavFajlZ13FalF/Bit9T31gzUCh+pmgusSLmF6RgQpTZ3QEqddBptpK2gdTFgSQZY9YnLWSaGAeKQCc1HHG2swjuhb2O2Wgi3x1iGWvCXsWqF4D6kVTlur6l0jZc5QDr7+EpWr+JdCeoSe46o8sLfV966w/qvdbl4TbYxN7ibR1p7NGK0tWL8G23cv+A8a3G55pxVfbnKM7WuD28P+miR13iM5U4TKCGhQT2rQTHoZm+nwXcw3LlAXG1g6Zo0yi9lrkZGPUy9N4zYVYSCHR2M1GbvJ6jMF4gpqw8zbN8dq9r2MPsNUw0Ansc2GgDKiE4QFWKFgW//Pvcz+C5Ci67uPTSb/ROMwdYz+iVO2cffvcsRDcbOabU3f9Rkn323Vncibobo9dHsYHHpEL/VF2kL7Nls4SqoD0z3ZstotXUJqqwTGD3NEvHjzBt89kr3EZ5E7bAbB/ql1nsveBUyCEeNVIrxlECe70thTNYRNeK5VTCQTLMh7UYwN7rv8zzcbQRxDF+++8+Sie70Fx9NuEo5Bhs3LIJ9iXXHs4xg+eBPUpub/GyZO3jCTK5Fbl8ax8wpqpCFOsciRux+mDnYwCwTR/rrtxLDi0wr3kpkyfOra6HnWO1kThPs2q3po2DPmNk4Rj362hYs8tQxhFZrZr1VKjkH3cYbvOKb+aheZ/69N9UJnahcdlor/F7Fju42t5c12olzf/3u0r \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 36a662c..8442914 100644 --- a/settings.gradle +++ b/settings.gradle @@ -30,6 +30,7 @@ include 'spring-security-kerberos-core' include 'spring-security-kerberos-client' include 'spring-security-kerberos-web' include 'spring-security-kerberos-samples:sec-server-spnego-form-auth' +include 'spring-security-kerberos-docs' rootProject.children.each { project -> project.buildFileName = "${project.name}.gradle" diff --git a/spring-security-kerberos-docs/antora.yml b/spring-security-kerberos-docs/antora.yml new file mode 100644 index 0000000..b2780f2 --- /dev/null +++ b/spring-security-kerberos-docs/antora.yml @@ -0,0 +1,13 @@ +name: spring-security-kerberos +version: '2.0.0' +prerelease: '-SNAPSHOT' +start_page: ROOT:index.adoc +nav: +- modules/ROOT/nav.adoc +ext: + collector: + run: + command: gradlew -q -PbuildSrc.skipTests=true "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :spring-security-kerberos-docs:generateAntoraYml + local: true + scan: + dir: ./build/generated-antora-resources \ No newline at end of file diff --git a/spring-security-kerberos-docs/local-antora-playbook.yml b/spring-security-kerberos-docs/local-antora-playbook.yml new file mode 100644 index 0000000..9b61b84 --- /dev/null +++ b/spring-security-kerberos-docs/local-antora-playbook.yml @@ -0,0 +1,22 @@ +antora: + extensions: + - '@antora/collector-extension' +site: + title: Spring Security Kerberos + url: https://spring-projects.github.io/spring-security-kerberos + start_page: spring-security-kerberos::index.adoc +asciidoc: + attributes: + page-pagination: true +content: + sources: + - url: .. + start_path: spring-security-kerberos-docs +urls: + latest_version_segment_strategy: redirect:to + latest_version_segment: '' + redirect_facility: static +ui: + bundle: + url: https://github.com/spring-io/antora-ui-spring/releases/download/latest/ui-bundle.zip + snapshot: true diff --git a/spring-security-kerberos-docs/modules/ROOT/examples/AuthProviderConfig.java b/spring-security-kerberos-docs/modules/ROOT/examples/AuthProviderConfig.java new file mode 100644 index 0000000..103f064 --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/examples/AuthProviderConfig.java @@ -0,0 +1,69 @@ +/* + * Copyright 2015 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.security.kerberos.docs; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity; +import org.springframework.security.kerberos.authentication.KerberosAuthenticationProvider; +import org.springframework.security.kerberos.authentication.sun.SunJaasKerberosClient; + +//tag::snippetA[] +@Configuration +@EnableWebMvcSecurity +public class AuthProviderConfig extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(HttpSecurity http) throws Exception { + http + .authorizeRequests() + .antMatchers("/", "/home").permitAll() + .anyRequest().authenticated() + .and() + .formLogin() + .loginPage("/login").permitAll() + .and() + .logout() + .permitAll(); + } + + @Override + protected void configure(AuthenticationManagerBuilder auth) throws Exception { + auth + .authenticationProvider(kerberosAuthenticationProvider()); + } + + @Bean + public KerberosAuthenticationProvider kerberosAuthenticationProvider() { + KerberosAuthenticationProvider provider = + new KerberosAuthenticationProvider(); + SunJaasKerberosClient client = new SunJaasKerberosClient(); + client.setDebug(true); + provider.setKerberosClient(client); + provider.setUserDetailsService(dummyUserDetailsService()); + return provider; + } + + @Bean + public DummyUserDetailsService dummyUserDetailsService() { + return new DummyUserDetailsService(); + } + +} +//end::snippetA[] diff --git a/spring-security-kerberos-docs/modules/ROOT/examples/AuthProviderConfig.xml b/spring-security-kerberos-docs/modules/ROOT/examples/AuthProviderConfig.xml new file mode 100644 index 0000000..a71c001 --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/examples/AuthProviderConfig.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-security-kerberos-docs/modules/ROOT/examples/AuthProviderConfigTest.java b/spring-security-kerberos-docs/modules/ROOT/examples/AuthProviderConfigTest.java new file mode 100644 index 0000000..26befa3 --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/examples/AuthProviderConfigTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2002-2015 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.springframework.security.kerberos.docs; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations= {"AuthProviderConfig.xml"}) +public class AuthProviderConfigTest { + + @Test + public void configLoads() {} +} diff --git a/spring-security-kerberos-docs/modules/ROOT/examples/DummyUserDetailsService.java b/spring-security-kerberos-docs/modules/ROOT/examples/DummyUserDetailsService.java new file mode 100644 index 0000000..e92ff90 --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/examples/DummyUserDetailsService.java @@ -0,0 +1,35 @@ +/* + * Copyright 2015 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.security.kerberos.docs; + +import org.springframework.security.core.authority.AuthorityUtils; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; + +//tag::snippetA[] +public class DummyUserDetailsService implements UserDetailsService { + + @Override + public UserDetails loadUserByUsername(String username) + throws UsernameNotFoundException { + return new User(username, "notUsed", true, true, true, true, + AuthorityUtils.createAuthorityList("ROLE_USER")); + } + +} +//end::snippetA[] diff --git a/spring-security-kerberos-docs/modules/ROOT/examples/KerberosLdapContextSourceConfig.java b/spring-security-kerberos-docs/modules/ROOT/examples/KerberosLdapContextSourceConfig.java new file mode 100644 index 0000000..2dd97f9 --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/examples/KerberosLdapContextSourceConfig.java @@ -0,0 +1,67 @@ +/* + * Copyright 2015 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.security.kerberos.client.docs; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.core.io.FileSystemResource; +import org.springframework.security.kerberos.client.config.SunJaasKrb5LoginConfig; +import org.springframework.security.kerberos.client.ldap.KerberosLdapContextSource; +import org.springframework.security.ldap.search.FilterBasedLdapUserSearch; +import org.springframework.security.ldap.userdetails.LdapUserDetailsMapper; +import org.springframework.security.ldap.userdetails.LdapUserDetailsService; + +public class KerberosLdapContextSourceConfig { + +//tag::snippetA[] + @Value("${app.ad-server}") + private String adServer; + + @Value("${app.service-principal}") + private String servicePrincipal; + + @Value("${app.keytab-location}") + private String keytabLocation; + + @Value("${app.ldap-search-base}") + private String ldapSearchBase; + + @Value("${app.ldap-search-filter}") + private String ldapSearchFilter; + + @Bean + public KerberosLdapContextSource kerberosLdapContextSource() { + KerberosLdapContextSource contextSource = new KerberosLdapContextSource(adServer); + SunJaasKrb5LoginConfig loginConfig = new SunJaasKrb5LoginConfig(); + loginConfig.setKeyTabLocation(new FileSystemResource(keytabLocation)); + loginConfig.setServicePrincipal(servicePrincipal); + loginConfig.setDebug(true); + loginConfig.setIsInitiator(true); + contextSource.setLoginConfig(loginConfig); + return contextSource; + } + + @Bean + public LdapUserDetailsService ldapUserDetailsService() { + FilterBasedLdapUserSearch userSearch = + new FilterBasedLdapUserSearch(ldapSearchBase, ldapSearchFilter, kerberosLdapContextSource()); + LdapUserDetailsService service = new LdapUserDetailsService(userSearch); + service.setUserDetailsMapper(new LdapUserDetailsMapper()); + return service; + } +//end::snippetA[] + +} diff --git a/spring-security-kerberos-docs/modules/ROOT/examples/KerberosRestTemplateConfig.java b/spring-security-kerberos-docs/modules/ROOT/examples/KerberosRestTemplateConfig.java new file mode 100644 index 0000000..ddff55f --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/examples/KerberosRestTemplateConfig.java @@ -0,0 +1,38 @@ +/* + * Copyright 2015 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.security.kerberos.client.docs; + +import org.springframework.security.kerberos.client.KerberosRestTemplate; + +public class KerberosRestTemplateConfig { + +//tag::snippetA[] + public void doWithTicketCache() { + KerberosRestTemplate restTemplate = + new KerberosRestTemplate(); + restTemplate.getForObject("http://neo.example.org:8080/hello", String.class); + } +//end::snippetA[] + +//tag::snippetB[] + public void doWithKeytabFile() { + KerberosRestTemplate restTemplate = + new KerberosRestTemplate("/tmp/user2.keytab", "user2@EXAMPLE.ORG"); + restTemplate.getForObject("http://neo.example.org:8080/hello", String.class); + } +//end::snippetB[] + +} diff --git a/spring-security-kerberos-docs/modules/ROOT/examples/SpnegoConfig.java b/spring-security-kerberos-docs/modules/ROOT/examples/SpnegoConfig.java new file mode 100644 index 0000000..8704fc1 --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/examples/SpnegoConfig.java @@ -0,0 +1,118 @@ +/* + * Copyright 2015 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.security.kerberos.docs; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.FileSystemResource; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity; +import org.springframework.security.kerberos.authentication.KerberosAuthenticationProvider; +import org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider; +import org.springframework.security.kerberos.authentication.sun.SunJaasKerberosClient; +import org.springframework.security.kerberos.authentication.sun.SunJaasKerberosTicketValidator; +import org.springframework.security.kerberos.web.authentication.SpnegoAuthenticationProcessingFilter; +import org.springframework.security.kerberos.web.authentication.SpnegoEntryPoint; +import org.springframework.security.web.authentication.www.BasicAuthenticationFilter; + +//tag::snippetA[] +@Configuration +@EnableWebMvcSecurity +public class SpnegoConfig extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(HttpSecurity http) throws Exception { + http + .exceptionHandling() + .authenticationEntryPoint(spnegoEntryPoint()) + .and() + .authorizeRequests() + .antMatchers("/", "/home").permitAll() + .anyRequest().authenticated() + .and() + .formLogin() + .loginPage("/login").permitAll() + .and() + .logout() + .permitAll() + .and() + .addFilterBefore( + spnegoAuthenticationProcessingFilter(authenticationManagerBean()), + BasicAuthenticationFilter.class); + } + + @Override + protected void configure(AuthenticationManagerBuilder auth) + throws Exception { + auth + .authenticationProvider(kerberosAuthenticationProvider()) + .authenticationProvider(kerberosServiceAuthenticationProvider()); + } + + @Bean + public KerberosAuthenticationProvider kerberosAuthenticationProvider() { + KerberosAuthenticationProvider provider = + new KerberosAuthenticationProvider(); + SunJaasKerberosClient client = new SunJaasKerberosClient(); + client.setDebug(true); + provider.setKerberosClient(client); + provider.setUserDetailsService(dummyUserDetailsService()); + return provider; + } + + @Bean + public SpnegoEntryPoint spnegoEntryPoint() { + return new SpnegoEntryPoint("/login"); + } + + @Bean + public SpnegoAuthenticationProcessingFilter spnegoAuthenticationProcessingFilter( + AuthenticationManager authenticationManager) { + SpnegoAuthenticationProcessingFilter filter = + new SpnegoAuthenticationProcessingFilter(); + filter.setAuthenticationManager(authenticationManager); + return filter; + } + + @Bean + public KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider() { + KerberosServiceAuthenticationProvider provider = + new KerberosServiceAuthenticationProvider(); + provider.setTicketValidator(sunJaasKerberosTicketValidator()); + provider.setUserDetailsService(dummyUserDetailsService()); + return provider; + } + + @Bean + public SunJaasKerberosTicketValidator sunJaasKerberosTicketValidator() { + SunJaasKerberosTicketValidator ticketValidator = + new SunJaasKerberosTicketValidator(); + ticketValidator.setServicePrincipal("HTTP/servicehost.example.org@EXAMPLE.ORG"); + ticketValidator.setKeyTabLocation(new FileSystemResource("/tmp/service.keytab")); + ticketValidator.setDebug(true); + return ticketValidator; + } + + @Bean + public DummyUserDetailsService dummyUserDetailsService() { + return new DummyUserDetailsService(); + } + +} +//end::snippetA[] diff --git a/spring-security-kerberos-docs/modules/ROOT/examples/SpnegoConfig.xml b/spring-security-kerberos-docs/modules/ROOT/examples/SpnegoConfig.xml new file mode 100644 index 0000000..5a05b8f --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/examples/SpnegoConfig.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/reference/asciidoc/images/drawio-kerb-cc1.png b/spring-security-kerberos-docs/modules/ROOT/images/drawio-kerb-cc1.png similarity index 100% rename from docs/src/reference/asciidoc/images/drawio-kerb-cc1.png rename to spring-security-kerberos-docs/modules/ROOT/images/drawio-kerb-cc1.png diff --git a/docs/src/reference/asciidoc/images/drawio-kerb-cc2.png b/spring-security-kerberos-docs/modules/ROOT/images/drawio-kerb-cc2.png similarity index 100% rename from docs/src/reference/asciidoc/images/drawio-kerb-cc2.png rename to spring-security-kerberos-docs/modules/ROOT/images/drawio-kerb-cc2.png diff --git a/docs/src/reference/asciidoc/images/drawio-kerb-cc3.png b/spring-security-kerberos-docs/modules/ROOT/images/drawio-kerb-cc3.png similarity index 100% rename from docs/src/reference/asciidoc/images/drawio-kerb-cc3.png rename to spring-security-kerberos-docs/modules/ROOT/images/drawio-kerb-cc3.png diff --git a/docs/src/reference/asciidoc/images/drawio-kerb-cc4.png b/spring-security-kerberos-docs/modules/ROOT/images/drawio-kerb-cc4.png similarity index 100% rename from docs/src/reference/asciidoc/images/drawio-kerb-cc4.png rename to spring-security-kerberos-docs/modules/ROOT/images/drawio-kerb-cc4.png diff --git a/docs/src/reference/asciidoc/images/ff1.png b/spring-security-kerberos-docs/modules/ROOT/images/ff1.png similarity index 100% rename from docs/src/reference/asciidoc/images/ff1.png rename to spring-security-kerberos-docs/modules/ROOT/images/ff1.png diff --git a/docs/src/reference/asciidoc/images/ff2.png b/spring-security-kerberos-docs/modules/ROOT/images/ff2.png similarity index 100% rename from docs/src/reference/asciidoc/images/ff2.png rename to spring-security-kerberos-docs/modules/ROOT/images/ff2.png diff --git a/docs/src/reference/asciidoc/images/ff3.png b/spring-security-kerberos-docs/modules/ROOT/images/ff3.png similarity index 100% rename from docs/src/reference/asciidoc/images/ff3.png rename to spring-security-kerberos-docs/modules/ROOT/images/ff3.png diff --git a/docs/src/reference/asciidoc/images/ie1.png b/spring-security-kerberos-docs/modules/ROOT/images/ie1.png similarity index 100% rename from docs/src/reference/asciidoc/images/ie1.png rename to spring-security-kerberos-docs/modules/ROOT/images/ie1.png diff --git a/docs/src/reference/asciidoc/images/ie2.png b/spring-security-kerberos-docs/modules/ROOT/images/ie2.png similarity index 100% rename from docs/src/reference/asciidoc/images/ie2.png rename to spring-security-kerberos-docs/modules/ROOT/images/ie2.png diff --git a/spring-security-kerberos-docs/modules/ROOT/nav.adoc b/spring-security-kerberos-docs/modules/ROOT/nav.adoc new file mode 100644 index 0000000..db39060 --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/nav.adoc @@ -0,0 +1,5 @@ +* xref:index.adoc[Overview] +* xref:introduction.adoc[Introduction] +* xref:ssk.adoc[Reference] +* xref:samples.adoc[Samples] +* xref:appendix.adoc[Appendices] diff --git a/docs/src/reference/asciidoc/appendix.adoc b/spring-security-kerberos-docs/modules/ROOT/pages/appendix.adoc similarity index 95% rename from docs/src/reference/asciidoc/appendix.adoc rename to spring-security-kerberos-docs/modules/ROOT/pages/appendix.adoc index 4097596..f007dfe 100644 --- a/docs/src/reference/asciidoc/appendix.adoc +++ b/spring-security-kerberos-docs/modules/ROOT/pages/appendix.adoc @@ -10,7 +10,7 @@ user source. [source,java,indent=0] ---- -include::samples/DummyUserDetailsService.java[tags=snippetA] +include::example$DummyUserDetailsService.java[tags=snippetA] ---- [appendix] @@ -18,7 +18,7 @@ include::samples/DummyUserDetailsService.java[tags=snippetA] In any authentication process there are usually a three parties involved. -image:images/drawio-kerb-cc1.png[] +image:drawio-kerb-cc1.png[] First is a `client` which sometimes is a client computer but in most of the scenarios it is the actual user sitting on a computer and @@ -40,7 +40,7 @@ Effectively `KDC` has its own key and other keys for domain users. Interestingly there is no communication between a `resource` and a `KDC` during the authentication process. -image:images/drawio-kerb-cc2.png[] +image:drawio-kerb-cc2.png[] When client wants to authenticate itself with a `resource` it first needs to communicate with a `KDC`. `Client` will craft a special package @@ -61,7 +61,7 @@ Ticket` which is signed by a KDC's own private key. Later when operation is succesfull it knows that it was a ticket it itself originally signed and gave to a `client`. -image:images/drawio-kerb-cc3.png[] +image:drawio-kerb-cc3.png[] When client wants to get a ticket which it can use to authenticate with a service, `TGT` is send to `KDC` which then signs a service ticket @@ -69,7 +69,7 @@ with service's own key. This a moment when a trust between `client` and `service` is created. This service ticket contains data which only `service` itself is able to decrypt. -image:images/drawio-kerb-cc4.png[] +image:drawio-kerb-cc4.png[] When `client` is authenticating with a service it sends previously received service ticket to a service which then thinks that I don't @@ -97,8 +97,8 @@ Initializing database '/var/lib/krb5kdc/principal' for realm 'EXAMPLE.ORG', master key name 'K/M@EXAMPLE.ORG' You will be prompted for the database Master Password. It is important that you NOT FORGET this password. -Enter KDC database master key: -Re-enter KDC database master key to verify: +Enter KDC database master key: +Re-enter KDC database master key to verify: ---- `kadmin` command can be used to administer Kerberos environment but @@ -116,7 +116,7 @@ Lets use `kadmin.local` command to create one. [source,text,indent=0] ---- -root@neo:/etc/krb5kdc# kadmin.local +root@neo:/etc/krb5kdc# kadmin.local Authenticating as principal root/admin@EXAMPLE.ORG with password. kadmin.local: listprincs @@ -129,8 +129,8 @@ krbtgt/EXAMPLE.ORG@EXAMPLE.ORG kadmin.local: addprinc root/admin@EXAMPLE.ORG WARNING: no policy specified for root/admin@EXAMPLE.ORG; defaulting to no policy -Enter password for principal "root/admin@EXAMPLE.ORG": -Re-enter password for principal "root/admin@EXAMPLE.ORG": +Enter password for principal "root/admin@EXAMPLE.ORG": +Re-enter password for principal "root/admin@EXAMPLE.ORG": Principal "root/admin@EXAMPLE.ORG" created. ---- @@ -139,7 +139,7 @@ services. [source,text,indent=0] ---- -# cat /etc/krb5kdc/kadm5.acl +# cat /etc/krb5kdc/kadm5.acl # This file Is the access control list for krb5 administration. */admin * ---- @@ -152,8 +152,8 @@ principal. Lets create our first user `user1`. kadmin: addprinc user1 WARNING: no policy specified for user1@EXAMPLE.ORG; defaulting to no policy -Enter password for principal "user1@EXAMPLE.ORG": -Re-enter password for principal "user1@EXAMPLE.ORG": +Enter password for principal "user1@EXAMPLE.ORG": +Re-enter password for principal "user1@EXAMPLE.ORG": Principal "user1@EXAMPLE.ORG" created. ---- @@ -164,8 +164,8 @@ Lets create our second user `user2` and export a keytab file. kadmin: addprinc user2 WARNING: no policy specified for user2@EXAMPLE.ORG; defaulting to no policy -Enter password for principal "user2@EXAMPLE.ORG": -Re-enter password for principal "user2@EXAMPLE.ORG": +Enter password for principal "user2@EXAMPLE.ORG": +Re-enter password for principal "user2@EXAMPLE.ORG": Principal "user2@EXAMPLE.ORG" created. kadmin: ktadd -k /tmp/user2.keytab user2@EXAMPLE.ORG @@ -313,13 +313,13 @@ have a valid kerberos tickets as shown below. [source,text] ---- -$ klist +$ klist klist: Credentials cache file '/tmp/krb5cc_1000' not found ---- We already have a keytab file we exported from Windows AD to be used with tomcat running on Linux. Lets try to use that to authenticate -with Windows AD. +with Windows AD. You can have a dedicated config file which usually can be used with native Linux commands and JVMs via system propertys. @@ -429,7 +429,7 @@ enabled to perform Spnego authentication. === Chrome With Google Chrome you generally need to set command-line parameters -order to white list servers with Chrome will negotiate. +order to white list servers with Chrome will negotiate. - on Windows machines (clients): Chrome shares the configuration with Internet Explorer so if all changes were applied to IE (as described diff --git a/spring-security-kerberos-docs/modules/ROOT/pages/index.adoc b/spring-security-kerberos-docs/modules/ROOT/pages/index.adoc new file mode 100644 index 0000000..87d7634 --- /dev/null +++ b/spring-security-kerberos-docs/modules/ROOT/pages/index.adoc @@ -0,0 +1 @@ += Spring Security Kerberos - Reference Documentation diff --git a/docs/src/reference/asciidoc/introduction.adoc b/spring-security-kerberos-docs/modules/ROOT/pages/introduction.adoc similarity index 87% rename from docs/src/reference/asciidoc/introduction.adoc rename to spring-security-kerberos-docs/modules/ROOT/pages/introduction.adoc index 1824373..df09436 100644 --- a/docs/src/reference/asciidoc/introduction.adoc +++ b/spring-security-kerberos-docs/modules/ROOT/pages/introduction.adoc @@ -6,7 +6,7 @@ application developers to Kerberos concepts with Spring. == Requirements -Spring Security Kerberos {revnumber} is built and tested with JDK 7, +Spring Security Kerberos {version} is built and tested with JDK 17, Spring Security {spring-security-version} and Spring Framework {spring-version}. [IMPORTANT] diff --git a/docs/src/reference/asciidoc/samples.adoc b/spring-security-kerberos-docs/modules/ROOT/pages/samples.adoc similarity index 91% rename from docs/src/reference/asciidoc/samples.adoc rename to spring-security-kerberos-docs/modules/ROOT/pages/samples.adoc index 0797f6c..7b2123a 100644 --- a/docs/src/reference/asciidoc/samples.adoc +++ b/spring-security-kerberos-docs/modules/ROOT/pages/samples.adoc @@ -54,7 +54,7 @@ using command-line options or custom `application.yml` file. Run a server. [source,text,subs="attributes"] ---- -$ java -jar sec-server-win-auth-{revnumber}.jar +$ java -jar sec-server-win-auth-{version}.jar ---- [IMPORTANT] @@ -72,15 +72,15 @@ windows kerberos environment. Login to `Windows 8.1` using domain credentials and access sample -image:images/ie1.png[] -image:images/ie2.png[] +image:ie1.png[] +image:ie2.png[] Access sample application from a non windows vm and use domain credentials manually. -image:images/ff1.png[] -image:images/ff2.png[] -image:images/ff3.png[] +image:ff1.png[] +image:ff2.png[] +image:ff3.png[] [[samples-sec-server-client-auth]] @@ -92,7 +92,7 @@ form login. Run a server. [source,text,subs="attributes"] ---- -$ java -jar sec-server-client-auth-{revnumber}.jar +$ java -jar sec-server-client-auth-{version}.jar ---- [source,yaml,indent=0] @@ -112,7 +112,7 @@ manually using credentials. [source,text] ---- $ kinit user1 -Password for user1@EXAMPLE.ORG: +Password for user1@EXAMPLE.ORG: $ klist Ticket cache: FILE:/tmp/krb5cc_1000 @@ -141,7 +141,7 @@ Valid starting Expires Service principal Run a server. [source,text,subs="attributes"] ---- -$ java -jar sec-server-spnego-form-auth-{revnumber}.jar +$ java -jar sec-server-spnego-form-auth-{version}.jar ---- Now you should be able to open your browser and let it do Spnego @@ -170,7 +170,7 @@ using xml based configuration instead of JavaConfig. Run a server. [source,text,subs="attributes"] ---- -$ java -jar sec-server-spnego-form-auth-xml-{revnumber}.jar +$ java -jar sec-server-spnego-form-auth-xml-{version}.jar ---- [[samples-sec-client-rest-template]] @@ -193,7 +193,7 @@ Using a `user1` principal <>, do a kerberos login manually using credentials. [source,text,subs="attributes"] ---- -$ java -jar sec-client-rest-template-{revnumber}.jar --app.user-principal --app.keytab-location +$ java -jar sec-client-rest-template-{version}.jar --app.user-principal --app.keytab-location ---- [NOTE] @@ -219,7 +219,7 @@ If operation is succesfull you should see below output with `user1@EXAMPLE.ORG`. Or use a `user2` with a keytab file. [source,text,subs="attributes"] ---- -$ java -jar sec-client-rest-template-{revnumber}.jar +$ java -jar sec-client-rest-template-{version}.jar ---- If operation is succesfull you should see below output with `user2@EXAMPLE.ORG`. diff --git a/docs/src/reference/asciidoc/ssk.adoc b/spring-security-kerberos-docs/modules/ROOT/pages/ssk.adoc similarity index 84% rename from docs/src/reference/asciidoc/ssk.adoc rename to spring-security-kerberos-docs/modules/ROOT/pages/ssk.adoc index cb06a3b..c505544 100644 --- a/docs/src/reference/asciidoc/ssk.adoc +++ b/spring-security-kerberos-docs/modules/ROOT/pages/ssk.adoc @@ -18,14 +18,14 @@ Provider configuration using JavaConfig. [source,java,indent=0] ---- -include::samples/AuthProviderConfig.java[tags=snippetA] +include::example$AuthProviderConfig.java[tags=snippetA] ---- Provider configuration using xml. [source,xml,indent=0] ---- -include::samples/AuthProviderConfig.xml[tags=snippetA] +include::example$AuthProviderConfig.xml[tags=snippetA] ---- [[ssk-spnego]] @@ -35,14 +35,14 @@ Spnego configuration using JavaConfig. [source,java,indent=0] ---- -include::samples/SpnegoConfig.java[tags=snippetA] +include::example$SpnegoConfig.java[tags=snippetA] ---- Spnego configuration using xml. [source,xml,indent=0] ---- -include::samples/SpnegoConfig.xml[tags=snippetA] +include::example$SpnegoConfig.xml[tags=snippetA] ---- [[ssk-resttemplate]] @@ -64,13 +64,13 @@ configure this template. With ticket cache. [source,java,indent=0] ---- -include::samples/KerberosRestTemplateConfig.java[tags=snippetA] +include::example$KerberosRestTemplateConfig.java[tags=snippetA] ---- With keytab file. [source,java,indent=0] ---- -include::samples/KerberosRestTemplateConfig.java[tags=snippetB] +include::example$KerberosRestTemplateConfig.java[tags=snippetB] ---- [[ssk-kerberosldap]] @@ -88,7 +88,7 @@ which is at least proven to work well with Windows AD services. [source,java,indent=0] ---- -include::samples/KerberosLdapContextSourceConfig.java[tags=snippetA] +include::example$KerberosLdapContextSourceConfig.java[tags=snippetA] ---- [TIP] diff --git a/spring-security-kerberos-docs/spring-security-kerberos-docs.gradle b/spring-security-kerberos-docs/spring-security-kerberos-docs.gradle new file mode 100644 index 0000000..a6aa3e6 --- /dev/null +++ b/spring-security-kerberos-docs/spring-security-kerberos-docs.gradle @@ -0,0 +1,23 @@ +plugins { + id 'org.springframework.security.kerberos.docs' +} + +description = 'Spring Security Kerberos Documentation' + +dependencies { + management platform(project(":spring-security-kerberos-management")) + testImplementation 'org.springframework.boot:spring-boot-starter-test' +} + +node { + version = '16.15.0' +} + +antora { + version = '3.2.0-alpha.2' + options = [clean: true, fetch: true, stacktrace: true] + playbook = 'local-antora-playbook.yml' + packages = [ + '@antora/collector-extension': 'latest' + ] +}