Skip to content

Commit 1c2ad3a

Browse files
authored
Merge pull request #376 from chenrui333/update-docs
docs: update dependency version used in README and add TOC
2 parents 4f4340c + bf7671a commit 1c2ad3a

File tree

1 file changed

+58
-19
lines changed

1 file changed

+58
-19
lines changed

README.md

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# OneLogin's SAML Java Toolkit
1+
# OneLogin's SAML Java Toolkit <!-- omit in toc -->
22

33
[![Build Status](https://travis-ci.org/onelogin/java-saml.svg?branch=master)](https://travis-ci.org/onelogin/java-saml) [![Coverage Status](https://coveralls.io/repos/github/onelogin/java-saml/badge.svg?branch=master)](https://coveralls.io/github/onelogin/java-saml?branch=master)
44

@@ -17,17 +17,56 @@ Version 2.0.0 - 2.4.0, compatible with java7 / java8.
1717

1818
We [introduced some incompatibilities](https://github.com/onelogin/java-saml/issues/90), that could be fixed and make it compatible with java6.
1919

20-
Version 1.1.2 is considered to be deprecated. If you have used it, we strongly recommend that you migrate to the new version.
20+
Version 1.1.2 is considered to be deprecated. If you have used it, we strongly recommend that you migrate to the new version.
2121
We rebuilt the toolkit on 2.0.0, so code/settings that you had been using in the previous version will no longer be compatible.
2222

23+
- [Why add SAML support to my software?](#why-add-saml-support-to-my-software)
24+
- [General description](#general-description)
25+
- [Security warning](#security-warning)
26+
- [Installation](#installation)
27+
- [Hosting](#hosting)
28+
- [Github](#github)
29+
- [Maven](#maven)
30+
- [Dependencies](#dependencies)
31+
- [Working with the github repository code and Eclipse.](#working-with-the-github-repository-code-and-eclipse)
32+
- [Get the toolkit.](#get-the-toolkit)
33+
- [Adding java-saml toolkit components as a project](#adding-java-saml-toolkit-components-as-a-project)
34+
- [Adding the java-saml-tookit-jspsample as a project](#adding-the-java-saml-tookit-jspsample-as-a-project)
35+
- [Deploy the java-saml-tookit-jspsample](#deploy-the-java-saml-tookit-jspsample)
36+
- [Getting started](#getting-started)
37+
- [Learning the toolkit](#learning-the-toolkit)
38+
- [core (com.onelogin:java-saml-core)](#core-comoneloginjava-saml-core)
39+
- [toolkit (com.onelogin:java-saml)](#toolkit-comoneloginjava-saml)
40+
- [samples (com.onelogin:java-saml-tookit-samples)](#samples-comoneloginjava-saml-tookit-samples)
41+
- [How it works](#how-it-works)
42+
- [Javadocs](#javadocs)
43+
- [Settings](#settings)
44+
- [Properties File](#properties-file)
45+
- [KeyStores](#keystores)
46+
- [Dynamic Settings](#dynamic-settings)
47+
- [The HttpRequest](#the-httprequest)
48+
- [Initiate SSO](#initiate-sso)
49+
- [The SP Endpoints](#the-sp-endpoints)
50+
- [SP Metadata](#sp-metadata)
51+
- [Attribute Consumer Service(ACS)](#attribute-consumer-serviceacs)
52+
- [Single Logout Service (SLS)](#single-logout-service-sls)
53+
- [Initiate SLO](#initiate-slo)
54+
- [Extending the provided implementation](#extending-the-provided-implementation)
55+
- [Working behind load balancer](#working-behind-load-balancer)
56+
- [IdP with multiple certificates](#idp-with-multiple-certificates)
57+
- [Replay attacks](#replay-attacks)
58+
- [Demo included in the toolkit](#demo-included-in-the-toolkit)
59+
- [SP setup](#sp-setup)
60+
- [IdP setup](#idp-setup)
61+
- [How it works](#how-it-works-1)
2362

2463
## Why add SAML support to my software?
2564

2665
SAML is an XML-based standard for web browser single sign-on and is defined by
27-
the OASIS Security Services Technical Committee. The standard has been around
66+
the OASIS Security Services Technical Committee. The standard has been around
2867
since 2002, but lately it has become popular due to its advantages as follows:
2968

30-
* **Usability** - One-click access from portals or intranets, deep linking,
69+
* **Usability** - One-click access from portals or intranets, deep linking,
3170
password elimination and automatically renewing sessions make life
3271
easier for the user.
3372
* **Security** - Based on strong digital signatures for authentication and
@@ -40,7 +79,7 @@ since 2002, but lately it has become popular due to its advantages as follows:
4079
* **IT Friendly** - SAML simplifies life for IT because it centralizes
4180
authentication, provides greater visibility and makes directory
4281
integration easier.
43-
* **Opportunity** - B2B cloud vendor should support SAML to facilitate the
82+
* **Opportunity** - B2B cloud vendor should support SAML to facilitate the
4483
integration of their product.
4584

4685

@@ -75,7 +114,7 @@ In production, the **onelogin.saml2.strict** setting parameter MUST be set as **
75114

76115
In production also we highly recommend to register on the settings the IdP certificate instead of using the fingerprint method. The fingerprint, is a hash, so at the end is open to a collision attack that can end on a signature validation bypass. Other SAML toolkits deprecated that mechanism, we maintain it for compatibility and also to be used on test environment.
77116

78-
The IdPMetadataParser class does not validate in any way the URL that is introduced in order to be parsed.
117+
The IdPMetadataParser class does not validate in any way the URL that is introduced in order to be parsed.
79118

80119
Usually the same administrator that handles the Service Provider also sets the URL to the IdP, which should be a trusted resource.
81120

@@ -97,7 +136,7 @@ Install it as a maven dependency:
97136
<dependency>
98137
<groupId>com.onelogin</groupId>
99138
<artifactId>java-saml</artifactId>
100-
<version>2.6.0</version>
139+
<version>2.8.0</version>
101140
</dependency>
102141
```
103142

@@ -246,12 +285,12 @@ onelogin.saml2.sp.x509cert =
246285
# Future SP certificate, to be used during SP Key roll over
247286
onelogin.saml2.sp.x509certNew =
248287

249-
# Requires Format PKCS#8 BEGIN PRIVATE KEY
288+
# Requires Format PKCS#8 BEGIN PRIVATE KEY
250289
# If you have PKCS#1 BEGIN RSA PRIVATE KEY convert it by openssl pkcs8 -topk8 -inform pem -nocrypt -in sp.rsa_key -outform pem -out sp.pem
251290
onelogin.saml2.sp.privatekey =
252291

253292
# Organization
254-
onelogin.saml2.organization.name = SP Java
293+
onelogin.saml2.organization.name = SP Java
255294
onelogin.saml2.organization.displayname = SP Java Example
256295
onelogin.saml2.organization.url = http://sp.example.com
257296
onelogin.saml2.organization.lang = en
@@ -269,7 +308,7 @@ onelogin.saml2.sp.contact[1].contactType=other
269308
onelogin.saml2.sp.contact[1].company=Big Corp
270309
onelogin.saml2.sp.contact[1].email_address=info@example.com
271310

272-
# Legacy contacts (legacy way to specify just a technical and a support contact with minimal info)
311+
# Legacy contacts (legacy way to specify just a technical and a support contact with minimal info)
273312
onelogin.saml2.contacts.technical.given_name = Technical Guy
274313
onelogin.saml2.contacts.technical.email_address = technical@example.com
275314
onelogin.saml2.contacts.support.given_name = Support Guy
@@ -284,7 +323,7 @@ onelogin.saml2.idp.entityid =
284323
# URL Target of the IdP where the SP will send the Authentication Request Message
285324
onelogin.saml2.idp.single_sign_on_service.url =
286325

287-
# SAML protocol binding to be used to deliver the <AuthnRequest> message
326+
# SAML protocol binding to be used to deliver the <AuthnRequest> message
288327
# to the IdP. Onelogin Toolkit supports for this endpoint the
289328
# HTTP-Redirect binding only
290329
onelogin.saml2.idp.single_sign_on_service.binding = urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
@@ -316,7 +355,7 @@ onelogin.saml2.idp.x509cert =
316355
# If a fingerprint is provided, then the certFingerprintAlgorithm is required in order to
317356
# let the toolkit know which Algorithm was used. Possible values: sha1, sha256, sha384 or sha512
318357
# 'sha1' is the default value.
319-
# onelogin.saml2.idp.certfingerprint =
358+
# onelogin.saml2.idp.certfingerprint =
320359
# onelogin.saml2.idp.certfingerprint_algorithm = sha256
321360

322361
# Security settings
@@ -346,7 +385,7 @@ onelogin.saml2.security.want_messages_signed = false
346385
onelogin.saml2.security.want_assertions_signed = false
347386

348387
# Indicates a requirement for the Metadata of this SP to be signed.
349-
# Right now supported null (in order to not sign) or true (sign using SP private key)
388+
# Right now supported null (in order to not sign) or true (sign using SP private key)
350389
onelogin.saml2.security.sign_metadata =
351390

352391
# Indicates a requirement for the Assertions received by this SP to be encrypted
@@ -394,7 +433,7 @@ onelogin.saml2.security.reject_deprecated_alg = true
394433
# SAML specification states that no trimming for string elements should be performed, so no trimming will be
395434
# performed by default on extracted Name IDs and attribute values. However, some SAML implementations may add
396435
# undesirable surrounding whitespace when outputting XML (possibly due to formatting/pretty-printing).
397-
# These two options allow to optionally enable value trimming on extracted Name IDs (including issuers) and
436+
# These two options allow to optionally enable value trimming on extracted Name IDs (including issuers) and
398437
# attribute values.
399438
onelogin.saml2.parsing.trim_name_ids = false
400439
onelogin.saml2.parsing.trim_attribute_values = false
@@ -665,7 +704,7 @@ and later executing the redirection manually.
665704

666705
### Extending the provided implementation
667706

668-
All the provided SAML message classes (`AuthnRequest`, `SamlResponse`, `LogoutRequest`, `LogoutResponse`) can be extended to add or change the processing behavior.
707+
All the provided SAML message classes (`AuthnRequest`, `SamlResponse`, `LogoutRequest`, `LogoutResponse`) can be extended to add or change the processing behavior.
669708

670709
In particular, the classes used to produce outgoing messages (`AuthnRequest`, `LogoutRequest`, and `LogoutResponse`) also provide a `postProcessXml` method that can be overridden to customise the generation of the corresponding SAML message XML, along with the ability to pass in proper extensions of the input parameter classes (`AuthnRequestParams`, `LogoutRequestParams`, and `LogoutResponseParams` respectively).
671710

@@ -683,7 +722,7 @@ auth.setSamlMessageFactory(new SamlMessageFactory() {
683722
public SamlResponse createSamlResponse(Saml2Settings settings, HttpRequest request) throws Exception {
684723
return new SamlResponseEx(settings, request);
685724
}
686-
});
725+
});
687726
// then proceed with login...
688727
auth.login(relayState, new AuthnRequestParamsEx()); // the custom generation of AuthnReqeustEx will be executed
689728
// ... or process the response as usual
@@ -700,12 +739,12 @@ For Apache Tomcat this is done by setting the proxyName, proxyPort, scheme and s
700739

701740

702741
### IdP with multiple certificates
703-
742+
704743
In some scenarios the IdP uses different certificates for
705744
signing/encryption, or is under key rollover phase and more than one certificate is published on IdP metadata.
706-
745+
707746
In order to handle that the toolkit offers the `onelogin.saml2.idp.x509certMulti` parameters where you can set additional certificates that will be used to validate IdP signature. However just the certificate set in `onelogin.saml2.idp.x509cert` parameter will be used for encrypting.
708-
747+
709748

710749
### Replay attacks
711750

0 commit comments

Comments
 (0)