mod_auth_mellon/SOURCES/mellon_user_guide.html

7033 lines
1.0 MiB
HTML
Raw Normal View History

2019-05-07 04:08:43 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 1.5.6.1">
<meta name="author" content="John Dennis">
<title>mod_auth_mellon User Guide</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<style>
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
/* Remove comment around @import statement below when using as a custom stylesheet */
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
audio,canvas,video{display:inline-block}
audio:not([controls]){display:none;height:0}
[hidden],template{display:none}
script{display:none!important}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
a{background:transparent}
a:focus{outline:thin dotted}
a:active,a:hover{outline:0}
h1{font-size:2em;margin:.67em 0}
abbr[title]{border-bottom:1px dotted}
b,strong{font-weight:bold}
dfn{font-style:italic}
hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
mark{background:#ff0;color:#000}
code,kbd,pre,samp{font-family:monospace;font-size:1em}
pre{white-space:pre-wrap}
q{quotes:"\201C" "\201D" "\2018" "\2019"}
small{font-size:80%}
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
sup{top:-.5em}
sub{bottom:-.25em}
img{border:0}
svg:not(:root){overflow:hidden}
figure{margin:0}
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
legend{border:0;padding:0}
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
button,input{line-height:normal}
button,select{text-transform:none}
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
button[disabled],html input[disabled]{cursor:default}
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
textarea{overflow:auto;vertical-align:top}
table{border-collapse:collapse;border-spacing:0}
*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
html,body{font-size:100%}
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
a:hover{cursor:pointer}
img,object,embed{max-width:100%;height:auto}
object,embed{height:100%}
img{-ms-interpolation-mode:bicubic}
.left{float:left!important}
.right{float:right!important}
.text-left{text-align:left!important}
.text-right{text-align:right!important}
.text-center{text-align:center!important}
.text-justify{text-align:justify!important}
.hide{display:none}
img,object,svg{display:inline-block;vertical-align:middle}
textarea{height:auto;min-height:50px}
select{width:100%}
.center{margin-left:auto;margin-right:auto}
.spread{width:100%}
p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6}
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}
a{color:#2156a5;text-decoration:underline;line-height:inherit}
a:hover,a:focus{color:#1d4b8f}
a img{border:none}
p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
p aside{font-size:.875em;line-height:1.35;font-style:italic}
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
h1{font-size:2.125em}
h2{font-size:1.6875em}
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
h4,h5{font-size:1.125em}
h6{font-size:1em}
hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
em,i{font-style:italic;line-height:inherit}
strong,b{font-weight:bold;line-height:inherit}
small{font-size:60%;line-height:inherit}
code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
ul,ol{margin-left:1.5em}
ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
ul.square{list-style-type:square}
ul.circle{list-style-type:circle}
ul.disc{list-style-type:disc}
ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
dl dt{margin-bottom:.3125em;font-weight:bold}
dl dd{margin-bottom:1.25em}
abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
abbr{text-transform:none}
blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
blockquote cite:before{content:"\2014 \0020"}
blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
h1{font-size:2.75em}
h2{font-size:2.3125em}
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
h4{font-size:1.4375em}}
table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
table thead,table tfoot{background:#f7f8f7;font-weight:bold}
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7}
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table}
.clearfix:after,.float-group:after{clear:both}
*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word}
*:not(pre)>code.nobreak{word-wrap:normal}
*:not(pre)>code.nowrap{white-space:nowrap}
pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed}
em em{font-style:normal}
strong strong{font-weight:400}
.keyseq{color:rgba(51,51,51,.8)}
kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
.keyseq kbd:first-child{margin-left:0}
.keyseq kbd:last-child{margin-right:0}
.menuseq,.menuref{color:#000}
.menuseq b:not(.caret),.menuref{font-weight:inherit}
.menuseq{word-spacing:-.02em}
.menuseq b.caret{font-size:1.25em;line-height:.8}
.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
b.button:before,b.button:after{position:relative;top:-1px;font-weight:400}
b.button:before{content:"[";padding:0 3px 0 2px}
b.button:after{content:"]";padding:0 2px 0 3px}
p a>code:hover{color:rgba(0,0,0,.9)}
#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table}
#header:after,#content:after,#footnotes:after,#footer:after{clear:both}
#content{margin-top:1.25em}
#content:before{content:none}
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8}
#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px}
#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
#header .details span:first-child{margin-left:-.125em}
#header .details span.email a{color:rgba(0,0,0,.85)}
#header .details br{display:none}
#header .details br+span:before{content:"\00a0\2013\00a0"}
#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
#header .details br+span#revremark:before{content:"\00a0|\00a0"}
#header #revnumber{text-transform:capitalize}
#header #revnumber:after{content:"\00a0"}
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
#toc{border-bottom:1px solid #efefed;padding-bottom:.5em}
#toc>ul{margin-left:.125em}
#toc ul.sectlevel0>li>a{font-style:italic}
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
#toc li{line-height:1.3334;margin-top:.3334em}
#toc a{text-decoration:none}
#toc a:active{text-decoration:underline}
#toctitle{color:#7a2518;font-size:1.2em}
@media only screen and (min-width:768px){#toctitle{font-size:1.375em}
body.toc2{padding-left:15em;padding-right:0}
#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
body.toc2.toc-right{padding-left:0;padding-right:15em}
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}
@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
#toc.toc2{width:20em}
#toc.toc2 #toctitle{font-size:1.375em}
#toc.toc2>ul{font-size:.95em}
#toc.toc2 ul ul{padding-left:1.25em}
body.toc2.toc-right{padding-left:0;padding-right:20em}}
#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
#content #toc>:first-child{margin-top:0}
#content #toc>:last-child{margin-bottom:0}
#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em}
#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
.sect1{padding-bottom:.625em}
@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}
.sect1+.sect1{border-top:1px solid #efefed}
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0}
.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)}
table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit}
.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
.admonitionblock>table td.icon{text-align:center;width:80px}
.admonitionblock>table td.icon img{max-width:initial}
.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)}
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
.exampleblock>.content>:first-child{margin-top:0}
.exampleblock>.content>:last-child{margin-bottom:0}
.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
.sidebarblock>:first-child{margin-top:0}
.sidebarblock>:last-child{margin-bottom:0}
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8}
.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1}
.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em}
.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal}
@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}
@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}
.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
.listingblock pre.highlightjs{padding:0}
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
.listingblock pre.prettyprint{border-width:0}
.listingblock>.content{position:relative}
.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999}
.listingblock:hover code[data-lang]:before{display:block}
.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999}
.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"}
table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none}
table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45}
table.pyhltable td.code{padding-left:.75em;padding-right:0}
pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8}
pre.pygments .lineno{display:inline-block;margin-right:.25em}
table.pyhltable .linenodiv{background:none!important;padding-right:0!important}
.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em}
.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
.quoteblock blockquote{margin:0;padding:0;border:0}
.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right}
.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)}
.quoteblock .quoteblock blockquote{padding:0 0 0 .75em}
.quoteblock .quoteblock blockquote:before{display:none}
.verseblock{margin:0 1em 1.25em 1em}
.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
.verseblock pre strong{font-weight:400}
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
.quoteblock .attribution br,.verseblock .attribution br{display:none}
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
.quoteblock.abstract{margin:0 0 1.25em 0;display:block}
.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0}
.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none}
table.tableblock{max-width:100%;border-collapse:separate}
table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0}
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}
table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}
table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}
table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px 0}
table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0 0}
table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}
table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}
table.frame-all{border-width:1px}
table.frame-sides{border-width:0 1px}
table.frame-topbot{border-width:1px 0}
th.halign-left,td.halign-left{text-align:left}
th.halign-right,td.halign-right{text-align:right}
th.halign-center,td.halign-center{text-align:center}
th.valign-top,td.valign-top{vertical-align:top}
th.valign-bottom,td.valign-bottom{vertical-align:bottom}
th.valign-middle,td.valign-middle{vertical-align:middle}
table thead th,table tfoot th{font-weight:bold}
tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7}
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
p.tableblock>code:only-child{background:none;padding:0}
p.tableblock{font-size:1em}
td>div.verse{white-space:pre}
ol{margin-left:1.75em}
ul li ol{margin-left:1.5em}
dl dd{margin-left:1.125em}
dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
ul.unstyled,ol.unstyled{margin-left:0}
ul.checklist{margin-left:.625em}
ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden}
ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block}
ul.inline>li>*{display:block}
.unstyled dl dt{font-weight:400;font-style:normal}
ol.arabic{list-style-type:decimal}
ol.decimal{list-style-type:decimal-leading-zero}
ol.loweralpha{list-style-type:lower-alpha}
ol.upperalpha{list-style-type:upper-alpha}
ol.lowerroman{list-style-type:lower-roman}
ol.upperroman{list-style-type:upper-roman}
ol.lowergreek{list-style-type:lower-greek}
.hdlist>table,.colist>table{border:0;background:none}
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
td.hdlist1{font-weight:bold;padding-bottom:1.25em}
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
.colist>table tr>td:first-of-type{padding:.4em .75em 0 .75em;line-height:1;vertical-align:top}
.colist>table tr>td:first-of-type img{max-width:initial}
.colist>table tr>td:last-of-type{padding:.25em 0}
.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0}
.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em}
.imageblock>.title{margin-bottom:0}
.imageblock.thumb,.imageblock.th{border-width:6px}
.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
.image.left{margin-right:.625em}
.image.right{margin-left:.625em}
a.image{text-decoration:none;display:inline-block}
a.image object{pointer-events:none}
sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
sup.footnote a,sup.footnoteref a{text-decoration:none}
sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0}
#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;text-indent:-1.05em;margin-bottom:.2em}
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none}
#footnotes .footnote:last-of-type{margin-bottom:0}
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
.gist .file-data>table td.line-data{width:99%}
div.unbreakable{page-break-inside:avoid}
.big{font-size:larger}
.small{font-size:smaller}
.underline{text-decoration:underline}
.overline{text-decoration:overline}
.line-through{text-decoration:line-through}
.aqua{color:#00bfbf}
.aqua-background{background-color:#00fafa}
.black{color:#000}
.black-background{background-color:#000}
.blue{color:#0000bf}
.blue-background{background-color:#0000fa}
.fuchsia{color:#bf00bf}
.fuchsia-background{background-color:#fa00fa}
.gray{color:#606060}
.gray-background{background-color:#7d7d7d}
.green{color:#006000}
.green-background{background-color:#007d00}
.lime{color:#00bf00}
.lime-background{background-color:#00fa00}
.maroon{color:#600000}
.maroon-background{background-color:#7d0000}
.navy{color:#000060}
.navy-background{background-color:#00007d}
.olive{color:#606000}
.olive-background{background-color:#7d7d00}
.purple{color:#600060}
.purple-background{background-color:#7d007d}
.red{color:#bf0000}
.red-background{background-color:#fa0000}
.silver{color:#909090}
.silver-background{background-color:#bcbcbc}
.teal{color:#006060}
.teal-background{background-color:#007d7d}
.white{color:#bfbfbf}
.white-background{background-color:#fafafa}
.yellow{color:#bfbf00}
.yellow-background{background-color:#fafa00}
span.icon>.fa{cursor:default}
a span.icon>.fa{cursor:inherit}
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c}
.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900}
.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400}
.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000}
.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
p{margin-bottom:1.25rem}
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
.print-only{display:none!important}
@media print{@page{margin:1.25cm .75cm}
*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
a{color:inherit!important;text-decoration:underline!important}
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
abbr[title]:after{content:" (" attr(title) ")"}
pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
thead{display:table-header-group}
svg{max-width:100%}
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important}
.sect1{padding-bottom:0!important}
.sect1+.sect1{border:0!important}
#header>h1:first-child{margin-top:1.25rem}
body.book #header{text-align:center}
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0}
body.book #header .details{border:0!important;display:block;padding:0!important}
body.book #header .details span:first-child{margin-left:0!important}
body.book #header .details br{display:block}
body.book #header .details br+span:before{content:none!important}
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
.listingblock code[data-lang]:before{display:block}
#footer{background:none!important;padding:0 .9375em}
#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em}
.hide-on-print{display:none!important}
.print-only{display:block!important}
.hide-for-print{display:none!important}
.show-for-print{display:inherit!important}}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
</head>
<body class="article toc2 toc-left">
<div id="header">
<h1>mod_auth_mellon User Guide</h1>
<div class="details">
<span id="author" class="author">John Dennis</span><br>
<span id="email" class="email"><a href="mailto:jdennis@redhat.com">jdennis@redhat.com</a></span><br>
<span id="revnumber">version 1.3,</span>
<span id="revdate">2018-02-22</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
<li><a href="#_colophon">1. Colophon</a></li>
<li><a href="#_document_conventions">2. Document Conventions</a></li>
<li><a href="#_introduction">3. Introduction</a></li>
<li><a href="#_saml_overview">4. SAML Overview</a>
<ul class="sectlevel2">
<li><a href="#saml_roles">4.1. SAML Roles</a></li>
<li><a href="#saml_profiles">4.2. SAML Profiles</a></li>
<li><a href="#saml_bindings">4.3. SAML Bindings</a></li>
<li><a href="#_saml_messages">4.4. SAML Messages</a></li>
<li><a href="#web_sso_flow">4.5. SAML Web-SSO flow</a>
<ul class="sectlevel3">
<li><a href="#saml_sessions">4.5.1. Sessions</a></li>
</ul>
</li>
<li><a href="#http_post">4.6. HTTP Post and Self-Posting</a></li>
<li><a href="#entityID">4.7. entityID</a></li>
<li><a href="#name_id">4.8. Username, userid, SAML NameID</a>
<ul class="sectlevel3">
<li><a href="#_userid_vs_identity_or_why_userid_is_so_last_millennium">4.8.1. Userid vs. Identity (or why userid is so last millennium)</a></li>
<li><a href="#saml_nameid">4.8.2. How SAML identifies a subject</a></li>
<li><a href="#nameid_interpretation">4.8.3. Burden of interpreting NameID falls to the relying party</a></li>
<li><a href="#_how_mellon_handles_the_nameid">4.8.4. How Mellon handles the NameID</a></li>
<li><a href="#specify_mellon_nameid">4.8.5. How do you specify the NameID format in SAML?</a></li>
</ul>
</li>
<li><a href="#authentication_request">4.9. &lt;AuthnRequest&gt; Example</a></li>
<li><a href="#assertion_response">4.10. &lt;Assertion&gt; Example</a></li>
<li><a href="#endpoints">4.11. SAML Endpoints</a></li>
<li><a href="#relaystate">4.12. Relay State (How you return to the original URL)</a></li>
<li><a href="#metadata">4.13. The Role of Metadata</a>
<ul class="sectlevel3">
<li><a href="#metadata_keys">4.13.1. Certs and Keys Inside Metadata</a></li>
<li><a href="#sp_metadata">4.13.2. Service Provider Metadata</a></li>
<li><a href="#idp_metadata">4.13.3. Identity Provider Metadata</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#_installing_configuring_mellon">5. Installing &amp; Configuring Mellon</a>
<ul class="sectlevel2">
<li><a href="#_installing_mellon">5.1. Installing Mellon</a></li>
<li><a href="#mellon_config">5.2. Mellon Configuration</a>
<ul class="sectlevel3">
<li><a href="#load_mod_auth_mellon">5.2.1. Load mod_auth_mellon</a></li>
<li><a href="#mellon_config_files">5.2.2. Mellon Configuration Files</a></li>
</ul>
</li>
<li><a href="#_mellon_configuration_directives">5.3. Mellon Configuration Directives</a></li>
<li><a href="#mellon_config_file">5.4. Mellon Configuration File</a>
<ul class="sectlevel3">
<li><a href="#load_sp_metadata_into_idp">5.4.1. Load Your SP metadata into the IdP</a></li>
<li><a href="#obtain_idp_metadata">5.4.2. Obtaining IdP Metadata</a></li>
</ul>
</li>
<li><a href="#mellon_modes">5.5. Mellon Modes</a></li>
<li><a href="#metadata_creation">5.6. How is Mellon metadata created?</a>
<ul class="sectlevel3">
<li><a href="#using_mellon_create_metadata_sh">5.6.1. Using <code>mellon_create_metadata.sh</code></a></li>
<li><a href="#using_mellon_to_create_metadata">5.6.2. Using Mellon to generate its own metadata</a></li>
<li><a href="#_where_do_the_keys_and_certs_come_from">5.6.3. Where do the keys and certs come from?</a></li>
<li><a href="#sign_metadata">5.6.4. Signing metadata</a></li>
</ul>
</li>
<li><a href="#mellon_endpoint_path">5.7. MellonEndpointPath</a></li>
<li><a href="#mellon_endpoints">5.8. Mellon Endpoints</a></li>
<li><a href="#mellon_session">5.9. Mellon Session</a></li>
<li><a href="#mellon_cookie">5.10. Mellon Cookie</a></li>
</ul>
</li>
<li><a href="#_working_with_saml_attributes_and_exporting_values_to_web_apps">6. Working with SAML attributes and exporting values to web apps</a>
<ul class="sectlevel2">
<li><a href="#multiple_attribute_values">6.1. Handling multiple attribute values</a></li>
<li><a href="#map_assertion_attr_name">6.2. Map assertion attribute name to different Apache environment variable name</a></li>
<li><a href="#assertion_constraints">6.3. Using Mellon to apply constraints</a></li>
<li><a href="#set_remote_user">6.4. How to set REMOTE_USER</a></li>
</ul>
</li>
<li><a href="#deployment_considerations">7. Deployment Considerations</a>
<ul class="sectlevel2">
<li><a href="#apache_servername">7.1. Apache Servername</a></li>
<li><a href="#load_balancer">7.2. Load Balancer Issues</a>
<ul class="sectlevel3">
<li><a href="#_server_name">7.2.1. Server Name</a></li>
<li><a href="#load_balancer_persistence">7.2.2. Load balancer proxy persistence</a></li>
</ul>
</li>
<li><a href="#forwarded_http_headers">7.3. Forwarded HTTP Headers</a></li>
</ul>
</li>
<li><a href="#error_response">8. When a SAML party responds with an error</a>
<ul class="sectlevel2">
<li><a href="#_top_level_status_codes">8.1. Top-level status codes</a></li>
<li><a href="#_second_level_status_codes">8.2. Second-level status codes</a></li>
<li><a href="#_status_code_examples">8.3. Status code examples</a></li>
<li><a href="#find_status_code">8.4. Finding the <code>StatusCode</code></a></li>
</ul>
</li>
<li><a href="#gather_runtime_info">9. Gathering run-time information</a>
<ul class="sectlevel2">
<li><a href="#_apache_log_files">9.1. Apache log files</a></li>
<li><a href="#trace_saml_flow">9.2. Trace SAML flow</a></li>
<li><a href="#inspect_saml_messages">9.3. Inspect SAML messages</a>
<ul class="sectlevel3">
<li><a href="#saml_tracer">9.3.1. Firefox SAML Tracer</a></li>
<li><a href="#_chrome_saml_chrome_panel">9.3.2. Chrome, SAML Chrome Panel</a></li>
<li><a href="#encrypted_response">9.3.3. If the IdP response is encrypted</a></li>
</ul>
</li>
<li><a href="#inspect_mellon_env">9.4. Inspecting Mellon environment variables</a>
<ul class="sectlevel3">
<li><a href="#_python_wsgi_environment_dump">9.4.1. Python WSGI Environment Dump</a></li>
<li><a href="#_php_environment_dump">9.4.2. PHP Environment Dump</a></li>
</ul>
</li>
<li><a href="#mellon_diagnostics">9.5. Mellon Diagnostics</a>
<ul class="sectlevel3">
<li><a href="#using_mellon_diagnostics">9.5.1. Using Mellon Diagnostics</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#_potential_problems">10. Potential Problems</a>
<ul class="sectlevel2">
<li><a href="#_it_s_the_metadata">10.1. It&#8217;s the metadata</a></li>
<li><a href="#_behavior_does_not_change_after_modifying_any_saml_file">10.2. Behavior does not change after modifying any SAML file</a></li>
<li><a href="#_are_the_mellon_configuration_directives_syntactically_correct">10.3. Are the Mellon configuration directives syntactically correct?</a></li>
<li><a href="#_no_authnrequest_sent_to_idp">10.4. No AuthnRequest sent to IdP</a></li>
<li><a href="#incorrect_mellon_endpoint_path">10.5. Incorrect MellonEndpointPath</a></li>
<li><a href="#invalid_destination">10.6. HTTP_BAD_REQUEST - Invalid Destination on Response</a></li>
<li><a href="#_mellon_metadata_out_of_sync_with_mellon_configuration">10.7. Mellon metadata out of sync with Mellon configuration</a></li>
<li><a href="#_microsoft_adfs_issues">10.8. Microsoft ADFS issues</a>
<ul class="sectlevel3">
<li><a href="#adfs_sig_alg">10.8.1. ADFS Signature Algorithm</a></li>
<li><a href="#adfs_nameid_policy">10.8.2. ADFS NameIDPolicy</a></li>
</ul>
</li>
<li><a href="#_time_sync">10.9. Time Sync</a></li>
</ul>
</li>
<li><a href="#_glossary">11. Glossary</a></li>
<li><a href="#_appendix">Appendix A: Appendix</a>
<ul class="sectlevel2">
<li><a href="#authentication_request_wire">A.1. Example On-The-Wire AuthnRequest</a></li>
<li><a href="#assertion_response_wire">A.2. Example On-the-Wire &lt;Assertion&gt; response</a></li>
<li><a href="#mellon_diagnostics_example">A.3. Example Mellon Diagnostics</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_colophon">1. Colophon</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Author: John Dennis <a href="mailto:jdennis@redhat.com">jdennis@redhat.com</a></p>
</div>
<div class="paragraph">
<p>Version: 1.3</p>
</div>
<div class="paragraph">
<p>Date: 2018-02-22</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_document_conventions">2. Document Conventions</h2>
<div class="sectionbody">
<div class="sidebarblock">
<div class="content">
<div class="title">Example Data used in this document</div>
<div class="paragraph">
<p>This document contains many examples of SAML data. For consistency we
will use the following:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The SP is hosted on the node <code>mellon.example.com</code>.</p>
</li>
<li>
<p>The SP <code>MellonEndpointPath</code> is <code>/mellon</code></p>
</li>
<li>
<p>The SP <code>entityID</code> is <code><a href="https://mellon.example.com/mellon/metadata" class="bare">https://mellon.example.com/mellon/metadata</a></code></p>
</li>
<li>
<p>Mellon is protecting the URL location <code>/private</code> and everything
under it.</p>
</li>
<li>
<p>The protected resource is <code>/private/info.html</code> and hence the URL of
the protected resource is <code><a href="https://mellon.example.com/private/info.html" class="bare">https://mellon.example.com/private/info.html</a></code>.</p>
</li>
<li>
<p>The IdP is hosted on the node <code>rhsso.example.com</code></p>
</li>
<li>
<p>The IdP <code>entityID</code> is <code><a href="https://rhsso.example.com:8443/auth/realms/test" class="bare">https://rhsso.example.com:8443/auth/realms/test</a></code></p>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_introduction">3. Introduction</h2>
<div class="sectionbody">
<div class="paragraph">
<p>mod_auth_mellon is an Apache (httpd) authentication module
providing authentication and authorization services via SAML. Mellon
plays the role of a <em>Service Provider</em> (SP) in SAML.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_saml_overview">4. SAML Overview</h2>
<div class="sectionbody">
<div class="paragraph">
<p>SAML (<em>Security Assertion Markup Language</em>) is a framework for exchanging
security information between providers. The nonprofit
<a href="https://www.oasis-open.org/">OASIS</a> consortium is responsible for
defining and publishing the various SAML specifications. OASIS is an
acronym for <em>Organization for the Advancement of Structured
Information Standards</em>. All SAML specifications and errata can be
found at this location:</p>
</div>
<div class="paragraph">
<p><a href="https://docs.oasis-open.org/security/saml/v2.0/" class="bare">https://docs.oasis-open.org/security/saml/v2.0/</a></p>
</div>
<div class="paragraph">
<p>The SAML technical committee has published the
<a href="https://www.oasis-open.org/committees/download.php/27819/sstc-saml-tech-overview-2.0-cd-02.pdf">Security
Assertion Markup Language (SAML) V2.0 Technical Overview</a>. This is an
excellent high-level overview of SAML and worth reading to familiarize
yourself with general SAML operation and terminology.</p>
</div>
<div class="paragraph">
<p>SAML is a large complex standard that currently comprises 10 individual
specifications whose total content is hundreds of pages of printed
material. SAML is much too large to cover in this overview. Instead we
will focus on the most common use of SAML, Web Single Sign-On
(Web-SSO). This is the target focus of mod_auth_mellon, although
Mellon does support other profiles as well.</p>
</div>
<div class="paragraph">
<p>SAML organizes itself into <a href="#saml_profiles">Profiles</a> and
<a href="#saml_binding">Bindings</a>. A cursory overview of these two concepts
will help you understand SAML better and is especially important if
you have to refer to any SAML specifications.</p>
</div>
<div class="sect2">
<h3 id="saml_roles">4.1. SAML Roles</h3>
<div class="paragraph">
<p>Participants in SAML play different roles. An entity may be capable of
playing more than one role, however we typically only consider a single role when
discussing entity behavior. The defined SAML roles are:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Identity Provider (IdP)</p>
</li>
<li>
<p>Service Provider (SP)</p>
</li>
<li>
<p>Affiliation</p>
</li>
<li>
<p>Attribute Authority</p>
</li>
<li>
<p>Attribute Consumer</p>
</li>
<li>
<p>Policy Decision Point</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Of these we are only interested in Service Providers (SP) and Identity
Providers (IdP). Mellon is a Service Provider because it provides a
service to clients. Authentication and user information is provided by
an Identity Provider. The SP relies on the IdP for its authentication
needs. In SAML literature you will often see the term <em>attesting
party</em> or <em>asserting party</em>, which in most contexts means an IdP
because the IdP attests to or asserts certain claims in its role as
an <em>authority</em>. On the other hand a Service Provider is often referred
to as a <em>relying party</em> because it <em>relies</em> on the <em>assertions</em>
provided by an <em>authority</em>.</p>
</div>
</div>
<div class="sect2">
<h3 id="saml_profiles">4.2. SAML Profiles</h3>
<div class="paragraph">
<p>A SAML profile defines how SAML data is conveyed using
<a href="#saml_bindings">SAML Bindings</a> on a transport to accomplish a specific task. The
<em>Web Browser SSO Profile</em> is the best known and the one Mellon focuses
on. Other profiles include <em>Single Logout</em>, <em>Enhanced Client or Proxy
(ECP)</em>, <em>Identity Provider Discovery</em>, etc.</p>
</div>
<div class="paragraph">
<p>SAML profiles are defined in the <a href="https://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf">Profiles
for the OASIS Security Assertion Markup Language (SAML) V2.0</a> specification.</p>
</div>
</div>
<div class="sect2">
<h3 id="saml_bindings">4.3. SAML Bindings</h3>
<div class="paragraph">
<p>SAML bindings define how SAML messages are mapped onto standard
messaging or communication protocols. The best way to think of a SAML
binding is as a transport mechanism. A key concept is that a given
SAML profile may permit the same SAML message to be conveyed using
variety of SAML bindings. Or by the same token a SAML profile may
prohibit the use of certain SAML bindings.</p>
</div>
<div class="paragraph">
<p>SAML bindings are defined in the
<a href="https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf">Bindings
for the OASIS Security Assertion Markup Language (SAML) V2.0</a>
specification.</p>
</div>
</div>
<div class="sect2">
<h3 id="_saml_messages">4.4. SAML Messages</h3>
<div class="paragraph">
<p>All SAML messages are conveyed as XML documents. A SAML XML message
may be transported in a variety of mechanisms known as a
<a href="#saml_bindings">SAML binding</a>. Examples of SAML bindings include:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>query parameters of an HTTP URL.</p>
</li>
<li>
<p>parameters of an HTML form.</p>
</li>
<li>
<p>wrapped in a SOAP message.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The exact way a SAML interchange operates and the SAML bindings which
are utilized in each step define what is called a SAML
<a href="#saml_profiles">SAML profile</a>. For example web-sso is defined by the
<em>Web Browser SSO Profile</em>.</p>
</div>
<div class="paragraph">
<p>SAML data, and its XML schema are defined in the <a href="https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf">Assertions and Protocols for the OASIS
Security Assertion Markup Language
(SAML) V2.0</a> <em>core</em> specification.</p>
</div>
</div>
<div class="sect2">
<h3 id="web_sso_flow">4.5. SAML Web-SSO flow</h3>
<div class="paragraph">
<p>The <em>Web Browser SSO Profile</em> is the best known <a href="#saml_profiles">SAML
profile</a> and the one Mellon focuses on. Your ability to configure
Mellon and diagnose Mellon deployment issues will be greatly enhanced
if you understand this flow and the two SAML messages conveyed in the
flow, <em>SAML AuthnRequest</em> and <em>SAML Assertion Response</em>.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiCiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9EVEQvc29kaXBvZGktMC5kdGQiCiAgIHhtbG5zOmlua3NjYXBlPSJodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy9uYW1lc3BhY2VzL2lua3NjYXBlIgogICB3aWR0aD0iNi43NzY1NDZpbiIKICAgaGVpZ2h0PSI1Ljk2ODgxMWluIgogICB2aWV3Qm94PSIwIDAgMTcyLjEyNDI3IDE1MS42MDc4IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJzdmc4IgogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjkyK2RldmVsIHVua25vd24iCiAgIHNvZGlwb2RpOmRvY25hbWU9InNhbWwtd2ViLXNzby5zdmciPgogIDxkZWZzCiAgICAgaWQ9ImRlZnMyIj4KICAgIDx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wMzU0NDMgeiIKICAgICAgICAgc3R5bGU9ImZpbGw6IzAwMDAwMDtmaWxsLW9wYWNpdHk6MTtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MC42MjU7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICAgIGlkPSJwYXRoMTIwMDYiCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiIC8+CiAgICA8L21hcmtlcj4KICAgIDxtYXJrZXIKICAgICAgIGlua3NjYXBlOmlzc3RvY2s9InRydWUiCiAgICAgICBzdHlsZT0ib3ZlcmZsb3c6dmlzaWJsZSIKICAgICAgIGlkPSJtYXJrZXIxMTEyMSIKICAgICAgIHJlZlg9IjAiCiAgICAgICByZWZZPSIwIgogICAgICAgb3JpZW50PSJhdXRvIgogICAgICAgaW5rc2NhcGU6c3RvY2tpZD0iQXJyb3cyTGVuZCI+CiAgICAgIDxwYXRoCiAgICAgICAgIHRyYW5zZm9ybT0ibWF0cml4KC0xLjEsMCwwLC0xLjEsLTEuMSwwKSIKICAgICAgICAgZD0iTSA4LjcxODU4NzgsNC4wMzM3MzUyIC0yLjIwNzI4OTUsMC4wMTYwMTMyNiA4LjcxODU4ODQsLTQuMDAxNzA3OCBjIC0xLjc0NTQ5ODQsMi4zNzIwNjA5IC0xLjczNTQ0MDgsNS42MTc0NTE5IC02ZS03LDguMDM1NDQzIHoiCiAgICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHR
</div>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">(1) HTTP Request to Service Provider</dt>
<dd>
<p>A user agent (e.g browser)
makes a request on behalf of a user for a protected resource hosted by
the Service Provider (e.g. Mellon). The SP asks if there is an
existing <a href="#saml_sessions">session</a> for the user. A session is
established by a prior successful SAML authentication. If a valid
session exists the SP immediately grants access to the protected
resource. A user session is communicated via a HTTP cookie (see
<a href="#mellon_cookie">Mellon Cookie</a>). If a valid session does not exist the SP begins
the authentication process.</p>
</dd>
<dt class="hdlist1">(2) &lt;AuthnRequest&gt; issued by Service Provider to Identity Provider</dt>
<dd>
<p>To authenticate the user the SP must send a <code>&lt;AuthnRequest&gt;</code> to an
IdP. In the <em>Web Browser SSO Profile</em> the SP determines the IdP. The
SP uses the <em>HTTP Redirect Binding</em> to convey the <code>&lt;AuthnRequest&gt;</code> to
the IdP. This binding embeds the <code>&lt;AuthnRequest&gt;</code> in the URL query
parameters of a HTTP redirect. The browser performs a redirect to the
IdP which decodes the <code>&lt;AuthnRequest&gt;</code> embedded in the URL query
parameters. The IdP also maintains <a href="#saml_sessions">session</a>
information for the user. If there is an existing valid session for
the user at the IdP it immediately responds with a <code>&lt;Assertion&gt;</code>
response unless the <code>&lt;AuthnRequest&gt;</code> has enabled <code>ForceAuthn</code> which
requires the user to be re-authenticated. See the
<a href="#authentication_request">AuthnRequest example</a> to better understand
its contents and how it appears as HTTP data. Part of the data
communicated along with the <code>&lt;AuthnRequest&gt;</code> is an item known as the
<a href="#relaystate">RelayState</a>. The <code>RelayState</code> is the mechanism which
permits the flow to return to the original requested resource.</p>
</dd>
<dt class="hdlist1">(3) Identity Provider identifies Principal</dt>
<dd>
<p>If necessary the IdP
authenticates the user. How the authentication is performed is <strong>not</strong>
defined by SAML. Typically the IdP responds with a login page where
the user enters their username and password. After successful
authentication the IdP establishes a session for the user.</p>
</dd>
<dt class="hdlist1">(4) Identity Provider issues a SAML &lt;Response&gt; to the Service Provider</dt>
<dd>
<p>Assuming a valid session now exists on the IdP for the user
it responds to the user&#8217;s browser with an <code>&lt;Assertion&gt;</code> using the <em>HTTP
Post Binding</em>. The HTTP Post binding is a bit magical, you may want to
review how this works in <a href="#http_post">HTTP Post and Self-Posting</a>. If a valid session could not
be established for the user a failed status response is issued instead.
See the <a href="#assertion_response">Assertion example</a> to better understand
the contents of an <code>&lt;Assertion&gt;</code>.</p>
</dd>
<dt class="hdlist1">(5) SP grants or denies access to the principal</dt>
<dd>
<p>If the response does not contain a successful <code>&lt;Assertion&gt;</code> response
the SP denies access by returning a 403 HTTP_FORBIDDEN status
response. Otherwise the SP processes the <code>&lt;Assertion&gt;</code>. The SP may
apply additional constraints on access to the protected resource (see
<a href="#assertion_constraints">Mellon constraints</a> for how Mellon can
apply additional authorization constraints). If the constraint check
passes then the SP establishes a session for the user. Mellon
associates the session information with a session ID returned in a
cookie (see <a href="#mellon_cookie">Mellon Cookie</a>).</p>
</dd>
<dt class="hdlist1">(6) SP redirects to original resource</dt>
<dd>
<p>The SP uses the <a href="#relaystate">RelayState</a> which identities the
original requested resource and responds with a redirect to that URL.</p>
</dd>
<dt class="hdlist1">(7) Browser accesses resource again</dt>
<dd>
<p>The browser upon receiving the redirect to the original resource URL
once again tries to access the resource. This time however there is a
valid session established for the user as communicated in the session
cookie. The SP validates the session ID which should immediately
succeed. At this point Mellon informs Apache that the authentication
and authorization check has succeeded for the URL.</p>
</dd>
<dt class="hdlist1">(8) SP responds with resource</dt>
<dd>
<p>Since the authentication and authorization checks in Apache have now
passed the contents of the resource are returned to the user&#8217;s browser.</p>
</dd>
</dl>
</div>
<div class="sect3">
<h4 id="saml_sessions">4.5.1. Sessions</h4>
<div class="paragraph">
<p>Sessions are maintained at both the SP and the IdP.</p>
</div>
<div class="paragraph">
<p>After an IdP successfully authenticates a user it creates a session
for the user. The IdP keeps a list of every SP the user is logged
into. When the user logs out the IdP sends a logout request to the
<em>SingleLogoutService</em> endpoint of each SP. When an IdP receives a
<code>&lt;AuthnRequest&gt;</code> from a SP it checks to see if it has an existing
valid session for that user, if so it can skip authenticating the user
again and instead just issue an <code>&lt;Assertion&gt;</code> based on the existing
session. However the SP can force the IdP to always re-authenticate if
it passes a <code>ForceAuthn</code> value of <code>True</code> in the <code>&lt;AuthnRequest&gt;</code>. The
IdP may further be restricted from interacting with the SP if the
request contains a <code>isPassive</code> value of <code>True</code>.</p>
</div>
<div class="paragraph">
<p>The IdP can inform the SP how long it wishes a SP session to be valid
by passing the <code>SessionNotOnOrAfter</code> attribute in a
<code>&lt;AuthnStatement&gt;</code>. Mellon respects the <code>SessionNotOnOrAfter</code>
attribute and will limit its session duration based on it.</p>
</div>
<div class="paragraph">
<p>The SP also maintains a session for the user. The SP session is
communicated between the browser and the SP using a cookie containing
the session ID. If the SP verifies the user has an existing valid
session when it receives a request it can immediately make an access
decision based on the cached session information for the user.</p>
</div>
<div class="paragraph">
<p>See <a href="#mellon_session">Mellon Sessions</a> for more information on the
particulars of how Mellon manages it sessions.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="http_post">4.6. HTTP Post and Self-Posting</h3>
<div class="paragraph">
<p>The <em>HTTP Post Binding</em> is used to convey an assertion back to a
SP. Assertions are usually too big to embed in a URL so some other
mechanism is needed to transport the <code>&lt;Assertion&gt;</code> response data. The
data is url-form-encoded as HTTP Form. The form&#8217;s action attribute
specifies the destination URL of the form data.</p>
</div>
<div class="paragraph">
<p>Where does the destination URL come from? The IdP will have loaded the
SP&#8217;s <a href="#metadata">metadata</a> which defines among other things the
various provider URL <a href="#endpoints">endpoints</a> where SAML communication
occurs. The <code>&lt;Assertion&gt;</code> needs to be sent to one of the SP&#8217;s
<em>AssertionConsumerService</em> endpoints, specifically the
<em>AssertionConsumerService</em> endpoint URL supporting the <em>HTTP-POST</em>
binding. The SP&#8217;s <em>AssertionConsumerService</em> URL as read from its
metadata is set to the action attribute of the HTTP form. <em>The action
URL is <strong>not</strong> read from any data in the &lt;AuthnRequest&gt;</em>, this is one
safeguard to prevent SAML messages from being sent to a unintended
nefarious party. Note that many SAML bindings define a <code>Destination</code>
attribute that is embedded in the SAML message. A further check
compares the <code>Destination</code> attribute to the URL the message was
received at, see <a href="#invalid_destination">HTTP_BAD_REQUEST - Invalid Destination on Response</a> for a common deployment
problem.</p>
</div>
<div class="paragraph">
<p>But how does the POST data as received by the user&#8217;s browser get back
to the <em>AssertionConsumerService</em> endpoint of the SP? The form will
<em>self-post</em> due to this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-html" data-lang="html">&lt;body onload="document.forms[0].submit()"&gt;</code></pre>
</div>
</div>
<div class="paragraph">
<p>As long as the user&#8217;s browser has not disabled scripts it will
immediately post the form data to the <em>AssertionConsumerService</em> URL
in the forms action attribute. If scripts have been disabled the HTML
will instruct the user to click the <code>Submit</code> button to post the form
data.</p>
</div>
</div>
<div class="sect2">
<h3 id="entityID">4.7. entityID</h3>
<div class="paragraph">
<p>Each SAML provider (e.g. a SP or IdP) is identified by its
<code>entityID</code>. You should think of the <code>entityID</code> as the globally unique
name of the provider. The <code>entityID</code> appears in most SAML messages and
in the provider&#8217;s metadata. This is the mechanism by which a SAML
message consumer associates the SAML message with the message
producers configuration properties. When a SAML provider receives a
message it extracts the <code>entityID</code> from the message and then looks up
the metadata belonging to that provider. The information in the
provider&#8217;s metadata is essential in order to operate on the SAML
message.</p>
</div>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
Any mismatch between the <code>entityID</code> the producer is emitting
and the consumer has loaded via the producer&#8217;s metadata will cause
failures. A common mistake is to modify a producer&#8217;s metadata
(e.g. update Mellon) but fail to reload Mellon&#8217;s metadata in the IdP.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>SAML places two requirements on the <code>entityID</code>:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>It <strong>must</strong> be an URI</p>
</li>
<li>
<p>It <strong>must</strong> be unique within the federation</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>A wise administrator will also seek to fulfill this additional
requirement when choosing an <code>entityID</code>:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>It should identify the organization instead of a specific node
within the organization.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>When migration time arrives it is far easier to move resources around
when those resources are not tied to a specific node. Thus choosing an
<code>entityID</code> comprised of the organization&#8217;s domain name and a generic
identifier such as <code>saml</code> would be one good approach, for example
<code><a href="https://bigcorp.com/saml" class="bare">https://bigcorp.com/saml</a></code>.</p>
</div>
<div class="paragraph">
<p>A common practice and one that recommended in the
<a href="https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf">Metadata
for the OASIS Security Assertion Markup Language (SAML)</a> specification
in section 4, <em>Metadata Publication and Resolution</em> is to use the
<code>entityID</code> as a <em>well-known-location</em> for retrieving the provider&#8217;s
metadata. In other words the <code>entityID</code> is the URL which returns the
provider&#8217;s XML metadata document when a HTTP GET is performed on that
URL. <em>It is not a requirement the <code>entityID</code> be the URL for metadata
download</em> rather it is one common convention. As discussed in the SAML
metadata specification other mechanisms can be established for
metadata publication.</p>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
SAML requires metadata publication to be integrity
protected. A provider&#8217;s metadata is literally the <em>keys to the
provider&#8217;s kingdom</em> as it contains the cryptographic keys used during
SAML authentication as well as other vital SAML properties. <em>It is
essential to establish trust and validate the metadata.</em> Metadata can
be signed but the easiest way to assure metadata integrity and the
most common is to make sure metadata is only exchanged via a secure
and trusted channel. TLS provides such a mechanism. Therefore if you
publish metadata (and Mellon always does regardless of whether Mellon&#8217;s
metadata endpoint matches Mellon&#8217;s <code>entityID</code>) it <strong><em>MUST</em></strong> occur
<em>only</em> over the <code>https</code> TLS scheme. Make sure your Apache
configuration redirects any <code>http</code> for Mellon to <code>https</code> and that your
https certificate is signed by a trusted CA such that others can
properly validate your https cert. <em>Do not use self-signed certs for
your https!</em> If you do and you&#8217;re on a public network, you&#8217;re
opening yourself up to a serious security vulnerability. Note, the
certs used <em>inside</em> the metadata can be self-signed, see
<a href="#metadata_keys">Certs and Keys Inside Metadata</a> for an explanation of why. The key concept here to take
away is that <em>a provider&#8217;s metadata provides the trust and is the validation
mechanism used by SAML</em>. Thus the integrity of the metadata is of
paramount importance.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Mellon&#8217;s metadata is <em>always</em> published at the URL location
<code>/$MellonEndpointPath/metadata</code>. See the description of
<a href="#mellon_endpoint_path">MellonEndpointPath</a> for more details on the
use of MellonEndpointPath. This is why most of the tools surrounding
Mellon generate an <code>entityID</code> as the concatenation of the https
scheme, the hostname, the MellonEndpointPath and "metadata". Thus for
example if the <code>MellonEndpointPath</code> for <code>bigcorp.com</code> was set to
<code>saml</code>, the <code>entityID</code> (the URL location for downloading its
metadata) would be <code><a href="https://bigcorp.com/saml/metadata" class="bare">https://bigcorp.com/saml/metadata</a></code>. The only reason
why "metadata" appears in the <code>entityID</code> is because that is Mellon&#8217;s
URL endpoint for metadata publication.</p>
</div>
</div>
<div class="sect2">
<h3 id="name_id">4.8. Username, userid, SAML NameID</h3>
<div class="sect3">
<h4 id="_userid_vs_identity_or_why_userid_is_so_last_millennium">4.8.1. Userid vs. Identity (or why userid is so last millennium)</h4>
<div class="paragraph">
<p>Many people struggle with the notion of <em>userid</em> when working with
SAML (or any other federated identity system). That&#8217;s because
historically <em>userid</em> has been used to describe <em>identity</em>. The two
are not the same. <em>Identity</em> identifies who or what something is for
the purpose of authentication and authorization as well as binding
attributes to that identity. In most of the literature the terms
<em>subject</em> and <em>principal</em> are used interchangeably to encapsulate the
concept of who or what is being identified. Although a
subject is often a person it need not be, it might also be an
inanimate object. A good example of a non-human subject would be a
computer service needing to be authenticated in order to perform
an operation.</p>
</div>
<div class="paragraph">
<p>Userids grew out of the early days of computing when all computing
was local and users were given accounts on a local system. The userid
was how operating systems tracked who a user was, in most cases it was
an integer. Clearly the integer userid only had meaning in the context
of the local system. As systems became networked integer userids
would be shared between systems but fundamentally nothing had changed,
the userid was still meaningful only among a group of cooperating
computers. Tools such as Yellow Pages, NIS, LDAP and Active Directory
were developed to provide a centralized repository of userids that
could be shared between cooperating networked computers. Along the way
the integer userid morphed into a string often partitioned into a
local part and a domain part. The domain part is used to identify the
realm. Realms are nothing other than collections of <em>unique</em> userids
often serving the needs of a organizational unit (e.g. company or
institution).</p>
</div>
<div class="paragraph">
<p>A key concept is that whoever is providing the userid, whether it be local
accounts created by the host operating system or a network provider of
userids such as NIS or LDAP, is an <strong>identity provider</strong> (IdP) with the
<em>userid</em> being the <strong>key</strong> used by <em>that</em> specific
<strong>identity provider</strong> to look up the <strong>identity</strong>. Hence <em>userids are only
meaningful in the context of a specific IdP!</em></p>
</div>
<div class="paragraph">
<p>By definition <em>federated identity</em> is the amalgamation of diverse
unrelated identity providers, each of which utilizes its own userid as
a key to look up an identity. Therefore while deploying federated
identity if you cling to the concept of a single userid you are likely to
be frustrated because you are abusing the concept.</p>
</div>
</div>
<div class="sect3">
<h4 id="saml_nameid">4.8.2. How SAML identifies a subject</h4>
<div class="paragraph">
<p>In SAML the user name (principal or subject) is conveyed as part of
the <code>&lt;Subject&gt;</code> element in the assertion. The subject identifier can
be any one of these elements:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>&lt;BaseID&gt;</code></p>
</li>
<li>
<p><code>&lt;NameID&gt;</code></p>
</li>
<li>
<p><code>&lt;EncryptedID&gt;</code></p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The most common is <code>&lt;NameID&gt;</code> and it usually includes a <code>Format</code>
attribute. If the <code>Format</code> attribute is absent then it defaults to the
unspecified <code>Format</code>. The <code>Format</code> attribute tells you how to interpret
the <code>NameID</code> value. For example if the subject&#8217;s <code>NameID</code> format is
<code>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</code> you know the
subject is being identified by their email address.</p>
</div>
<div class="paragraph">
<p>The currently defined <code>NameID</code> formats are:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">Unspecified</dt>
<dd>
<p>This is used when you don&#8217;t care what the <code>NameID</code> <code>Format</code> is, you&#8217;re
willing to accept whatever it defaults to by the provider.
(<code>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</code>)</p>
</dd>
<dt class="hdlist1">Email Address</dt>
<dd>
<p>The <code>NameID</code> is an email address as specified in RFC 2822 as a
<code>addr-spec</code> in the form <code>local-part@domain</code>. No common name
or other text is included and it is not enclosed in <code>&lt;</code> and <code>&gt;</code>.
(<code>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</code>)</p>
</dd>
<dt class="hdlist1">X.509 Subject Name</dt>
<dd>
<p>The <code>NameID</code> is an X.509 subject name in the form specified for the
<code>&lt;ds:X509SubjectName&gt;</code> element in the XML Signature Recommendation.
(<code>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</code>)</p>
</dd>
<dt class="hdlist1">Windows Domain Qualified Name</dt>
<dd>
<p>The <code>NameID</code> is a Windows domain qualified name. A Windows domain
qualified user name is a string of the form "DomainName\UserName". The
domain name and "\" separator MAY be omitted.
(<code>urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName</code>)</p>
</dd>
<dt class="hdlist1">Kerberos Principal Name</dt>
<dd>
<p>The <code>NameID</code> is in the form of a Kerberos principal name using the
format name[/instance]@REALM.
(<code>urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos</code>)</p>
</dd>
<dt class="hdlist1">Persistent Identifier</dt>
<dd>
<p>The <code>NameID</code> is a <em>persistent</em> opaque
identifier for a principal that is specific to an identity provider
and a service provider or affiliation of service providers. Opaque
means you cannot (easily) map the id to a user. In many cases the
persistent id is implemented as a random number or random
string. Persistent means you&#8217;ll always get the exact same <code>NameID</code> for
the same subject. Refer to <a href="#nameid_policy">NameIDPolicy</a> and its
<code>AllowCreate</code> attribute to understand if the IdP is allowed to create
a persistent id for the subject if it has not already done so.
(<code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>)</p>
</dd>
<dt class="hdlist1">Transient Identifier</dt>
<dd>
<p>The <code>NameID</code> is an opaque <em>temporary</em> id. Opaque means you cannot
(easily) map the id to a user. In many cases it&#8217;s implemented as a
random number or random string. Temporary means the id is valid <em>only</em> in the
context of the assertion response which contains it. Think of a
transient id as a one-time id that cannot be used again or referred to
again.
(<code>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</code>)</p>
</dd>
</dl>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
The important concept here is that SAML&#8217;s <code>NameID</code> as used to
identify a subject is not the traditional userid you are probably
used to. Furthermore SAML&#8217;s <code>NameID</code> <em>may</em> only be meaningful to the IdP
which issued it.
</td>
</tr>
</table>
</div>
</div>
<div class="sect3">
<h4 id="nameid_interpretation">4.8.3. Burden of interpreting NameID falls to the relying party</h4>
<div class="paragraph">
<p>Ultimately the SP needs to provide some sort of <em>userid</em> the
application it is hosting can utilize. <em>Only the application knows what it
needs!</em></p>
</div>
<div class="paragraph">
<p>Let&#8217;s take the example of an application which wishes to
identify its users by email address. There are two basic ways you can
do this with SAML.</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Specify a <code>NameIDPolicy</code> of
<code>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</code> when the SP
submits a <code>&lt;AuthnRequest&gt;</code> to the IdP. This tells the IdP you want the
subject&#8217;s <code>NameID</code> to be their email address.</p>
</li>
<li>
<p>Ignore the <code>NameID</code> returned in the assertion entirely, instead use
the assertion&#8217;s <code>email</code> attribute.</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>Solution #2 is very important to understand as it illustrates how many
organizations utilize SAML: they <em>build an identity from the
attributes bound to a subject</em>. They can use one or more attributes to
build a userid meaningful to the application. They may even require
the IdP return an attribute unique to the subject across a federation,
in this instance all IdPs in the federation must support that
attribute (this is just one approach). The <code>NameID</code> is <strong>not</strong> utilized
in solution #2 in large part because the <code>NameID</code> is likely to be
uniquely bound to the given IdP. This is why SAML&#8217;s <em>transient</em>
identifiers are often used: it simply does not matter what the
<code>NameID</code> is because the SP is not utilizing it therefore it can be any
random one-time value.</p>
</div>
<div class="paragraph">
<p>It is also important to understand either the <code>NameID</code> <em>or</em> the set of
attributes <em>or both</em> can be used to ultimately derive an identity to
pass to the application.</p>
</div>
<div class="paragraph">
<p>Another approach is to utilize SAML&#8217;s <em>persistent id</em> with the
observation that the pair (IdP, persistent id) always uniquely
and repeatably identifies the subject. The SP can maintain a table
that maps the (IdP, persistent id) pair to an
application-specific <em>identity</em> using this technique.</p>
</div>
</div>
<div class="sect3">
<h4 id="_how_mellon_handles_the_nameid">4.8.4. How Mellon handles the NameID</h4>
<div class="paragraph">
<p>Mellon extracts the <code>&lt;NameID&gt;</code> element from the
assertion&#8217;s <code>&lt;Subject&gt;</code> element and sets this to <code>NAME_ID</code> attribute. If
<code>&lt;NameID&gt;</code> is absent in the assertion you can change what Mellon
considers the user name to be to another value in one of the
assertions attributes if you wish. <code>MellonUser</code> names the attribute
you wish to use instead. If you want to export the username as
<code>REMOTE_USER</code> so your web app can process this very common CGI
variable see <a href="#set_remote_user">How to set REMOTE_USER</a></p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Please be aware that blindly exporting the SAML <code>NameID</code> to the
application may or may not be appropriate for the application. See the
explanation of <a href="#nameid_interpretation">NameID interpretation</a> to
understand the issues.
</td>
</tr>
</table>
</div>
</div>
<div class="sect3">
<h4 id="specify_mellon_nameid">4.8.5. How do you specify the NameID format in SAML?</h4>
<div class="paragraph">
<p>In SAML there are 2 configuration options related to the use of
<code>NameID</code>:</p>
</div>
<div class="paragraph">
<p>1. A provider declares which <code>NameID</code> formats it supports in its
<a href="#metadata">metadata</a> via the <code>&lt;NameIDFormat&gt;</code> element.
The following metadata excerpt illustrates a provider
which supports the <code>transient</code>, <code>persistent</code> and <code>X509SubjectName</code>
formats:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-xml" data-lang="xml">&lt;NameIDFormat&gt;
urn:oasis:names:tc:SAML:2.0:nameid-format:transient
&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;
urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;
urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
&lt;/NameIDFormat&gt;</code></pre>
</div>
</div>
<div class="paragraph">
<p>2. The SP indicates to the IdP in its <code>&lt;AuthnRequest&gt;</code> what <code>NameID</code>
format it wants returned via the <code>&lt;NameIDPolicy&gt;</code> element. The
<code>&lt;NameIDPolicy&gt;</code> should be one of the <code>NameIDFormat</code> elements
enumerated in the IdP&#8217;s metadata. The IdP is free to substitute
another <code>NameID</code> format or to return an <code>InvalidNameIDPolicy</code> error
status response if it can&#8217;t satisfy the request. <a id="nameid_policy"></a></p>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
Mellon defaults to a <code>NameIDFormat</code> of <code>transient</code> when it
<a href="#metadata_creation">generates its metadata</a>. You will need to
manually edit the <code>NameIDFormat</code> in your Mellon SP metadata if you
wish to use a <code>NameIDFormat</code> other than <code>transient</code>. When Mellon
generates its <code>&lt;AuthnRequest&gt;</code> it selects the <em>first</em> <code>NameIDFormat</code>
found in its metadata as the <code>NameIDPolicy</code>.
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect2">
<h3 id="authentication_request">4.9. &lt;AuthnRequest&gt; Example</h3>
<div class="paragraph">
<p>Here is an example <code>&lt;AuthnRequest&gt;</code> as emitted by Mellon.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-xml" data-lang="xml">&lt;samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="_59126C3306E4679F653022F0C4DA7F04" <i class="conum" data-value="1"></i><b>(1)</b>
Version="2.0"
IssueInstant="2017-06-28T13:39:14Z" <i class="conum" data-value="2"></i><b>(2)</b>
Destination="https://rhsso.example.com:8443/auth/realms/test/protocol/saml" <i class="conum" data-value="3"></i><b>(3)</b>
Consent="urn:oasis:names:tc:SAML:2.0:consent:current-implicit"
ForceAuthn="false" <i class="conum" data-value="4"></i><b>(4)</b>
IsPassive="false" <i class="conum" data-value="5"></i><b>(5)</b>
AssertionConsumerServiceURL="https://mellon.example.com/mellon/postResponse" <i class="conum" data-value="6"></i><b>(6)</b>
&gt;
&lt;saml:Issuer&gt;https://mellon.example.com/mellon/metadata&lt;/saml:Issuer&gt; <i class="conum" data-value="7"></i><b>(7)</b>
&lt;samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" <i class="conum" data-value="8"></i><b>(8)</b>
AllowCreate="true"/&gt; <i class="conum" data-value="9"></i><b>(9)</b>
&lt;/samlp:AuthnRequest&gt;</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td><code>ID</code>: Unique ID generated by Mellon to identify the SAML
request. It will appear in the SAML response in the <code>InResponseTo</code>
attribute. Used to correlate SAML request and responses.</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td><code>IssueInstant</code>: Timestamp of when request was made</td>
</tr>
<tr>
<td><i class="conum" data-value="3"></i><b>3</b></td>
<td><code>Destination</code>: Where this request was sent to. Used as a
protection to prevent malicious forwarding of requests to unintended
recipients. The recipient verifies the URL where it received the SAML
request matches the <code>Destination</code>.</td>
</tr>
<tr>
<td><i class="conum" data-value="4"></i><b>4</b></td>
<td><code>ForceAuthn</code>: If true the IdP <strong>must</strong> authenticate the principal
instead of relying on an existing session for the principal.</td>
</tr>
<tr>
<td><i class="conum" data-value="5"></i><b>5</b></td>
<td><code>IsPassive</code>: If true neither the user agent (browser) nor the IdP
may take control of the user interface.</td>
</tr>
<tr>
<td><i class="conum" data-value="6"></i><b>6</b></td>
<td><code>AssertionConsumerServiceURL</code>: Where to send the assertion
response (see <a href="#sp_metadata_acs">SP metadata AssertionConsumerService
for HTTP-POST binding</a> to see where this was defined.</td>
</tr>
<tr>
<td><i class="conum" data-value="7"></i><b>7</b></td>
<td><code>Issuer</code>: The SP which issued the AuthnRequest. See
<a href="#sp_metadata_entityid">SP metadata Issuer</a> to see where this was
defined. Also see the general description of <a href="#entityId">SAML Entity ID&#8217;s</a></td>
</tr>
<tr>
<td><i class="conum" data-value="8"></i><b>8</b></td>
<td><code>NameIDPolicy</code>: The SP requests that the Subject returned in the
assertion be identified by a transient name. See <a href="#name_id">Username, userid, SAML NameID</a> for more
details.</td>
</tr>
<tr>
<td><i class="conum" data-value="9"></i><b>9</b></td>
<td><code>AllowCreate</code>: If true then the IdP is allowed to create a new
identifier for the principal.</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>The <code>&lt;AuthnRequest&gt;</code> is sent using the <em>HTTP Redirect Binding</em>. The
above <code>&lt;AuthnRequest&gt;</code> appears on the wire as a URL with the SAML
data embedded as query parameters. You can see the "on the wire" HTTP
data for this <code>&lt;AuthnRequest&gt;</code> in
<a href="#authentication_request_wire">Example On-The-Wire AuthnRequest</a>. This illustrates the need for SAML
diagnostic tools because you cannot see the <code>&lt;AuthnRequest&gt;</code> XML
message and its assocated data (e.g. signature, <a href="#relaystate">RelayState</a>) by looking at the HTTP protocol.</p>
</div>
</div>
<div class="sect2">
<h3 id="assertion_response">4.10. &lt;Assertion&gt; Example</h3>
<div class="paragraph">
<p>This is an example of an <code>&lt;Assertion&gt;</code> response as generated by a Red
Hat SSO server (Keycloak) in response to the above
<a href="#authentication_request">&lt;AuthnRequest&gt; Example</a>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-xml" data-lang="xml">&lt;samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" <i class="conum" data-value="1"></i><b>(1)</b>
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
Destination="https://mellon.example.com/mellon/postResponse" <i class="conum" data-value="2"></i><b>(2)</b>
ID="ID_d06daaaf-64ec-44d3-95a7-08da893aa9d5" <i class="conum" data-value="3"></i><b>(3)</b>
InResponseTo="_59126C3306E4679F653022F0C4DA7F04" <i class="conum" data-value="4"></i><b>(4)</b>
IssueInstant="2017-06-28T13:39:27.331Z" <i class="conum" data-value="5"></i><b>(5)</b>
Version="2.0"&gt;
&lt;saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"&gt;https://rhsso.example.com:8443/auth/realms/test&lt;/saml:Issuer&gt; <i class="conum" data-value="6"></i><b>(6)</b>
&lt;dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt; <i class="conum" data-value="7"></i><b>(7)</b>
&lt;dsig:SignedInfo&gt;
&lt;dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;
&lt;dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" /&gt;
&lt;dsig:Reference URI="#ID_d06daaaf-64ec-44d3-95a7-08da893aa9d5"&gt; <i class="conum" data-value="8"></i><b>(8)</b>
&lt;dsig:Transforms&gt;
&lt;dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /&gt;
&lt;dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;
&lt;/dsig:Transforms&gt;
&lt;dsig:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /&gt;
&lt;dsig:DigestValue&gt;V/3iYohGv2Ot7pzy6q/BfAdXgSxmdCD7K+XEmFIZlUs=&lt;/dsig:DigestValue&gt;
&lt;/dsig:Reference&gt;
&lt;/dsig:SignedInfo&gt;
&lt;dsig:SignatureValue&gt;...&lt;/dsig:SignatureValue&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;1VPndjfABB6S4lb4zwMLjBUhxfzPFnfrvNYvRgcxiUM&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;...&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;dsig:KeyValue&gt;
&lt;dsig:RSAKeyValue&gt;
&lt;dsig:Modulus&gt;...&lt;/dsig:Modulus&gt;
&lt;dsig:Exponent&gt;AQAB&lt;/dsig:Exponent&gt;
&lt;/dsig:RSAKeyValue&gt;
&lt;/dsig:KeyValue&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/dsig:Signature&gt;
&lt;samlp:Status&gt; <i class="conum" data-value="9"></i><b>(9)</b>
&lt;samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" /&gt;
&lt;/samlp:Status&gt;
&lt;saml:Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" <i class="conum" data-value="10"></i><b>(10)</b>
ID="ID_c463a141-d471-40c3-860a-6559ce0a3556"
IssueInstant="2017-06-28T13:39:27.331Z"
Version="2.0"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"&gt;
&lt;saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"&gt;https://rhsso.example.com:8443/auth/realms/test&lt;/saml:Issuer&gt; <i class="conum" data-value="11"></i><b>(11)</b>
&lt;dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt; <i class="conum" data-value="12"></i><b>(12)</b>
&lt;dsig:SignedInfo&gt;
&lt;dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;
&lt;dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" /&gt;
&lt;dsig:Reference URI="#ID_c463a141-d471-40c3-860a-6559ce0a3556"&gt; <i class="conum" data-value="13"></i><b>(13)</b>
&lt;dsig:Transforms&gt;
&lt;dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /&gt;
&lt;dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;
&lt;/dsig:Transforms&gt;
&lt;dsig:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /&gt;
&lt;dsig:DigestValue&gt;w8bELRshtX7xHcwZCdglgfpyYBMJmVQJALPAclHHbLA=&lt;/dsig:DigestValue&gt;
&lt;/dsig:Reference&gt;
&lt;/dsig:SignedInfo&gt;
&lt;dsig:SignatureValue&gt;...&lt;/dsig:SignatureValue&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;1VPndjfABB6S4lb4zwMLjBUhxfzPFnfrvNYvRgcxiUM&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;...&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;dsig:KeyValue&gt;
&lt;dsig:RSAKeyValue&gt;
&lt;dsig:Modulus&gt;...&lt;/dsig:Modulus&gt;
&lt;dsig:Exponent&gt;AQAB&lt;/dsig:Exponent&gt;
&lt;/dsig:RSAKeyValue&gt;
&lt;/dsig:KeyValue&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/dsig:Signature&gt;
&lt;saml:Subject&gt; <i class="conum" data-value="14"></i><b>(14)</b>
&lt;saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" <i class="conum" data-value="15"></i><b>(15)</b>
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"&gt;
G-803528aa-2f9e-454b-a89c-55ee74e75d1e
&lt;/saml:NameID&gt;
&lt;saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"&gt;
&lt;saml:SubjectConfirmationData InResponseTo="_59126C3306E4679F653022F0C4DA7F04"
NotOnOrAfter="2017-06-28T13:44:25.331Z"
Recipient="https://mellon.example.com/mellon/postResponse"/&gt;
&lt;/saml:SubjectConfirmation&gt;
&lt;/saml:Subject&gt;
&lt;saml:Conditions NotBefore="2017-06-28T13:39:25.331Z"
NotOnOrAfter="2017-06-28T13:40:25.331Z"&gt;
&lt;saml:AudienceRestriction&gt;
&lt;saml:Audience&gt;https://mellon.example.com/mellon/metadata&lt;/saml:Audience&gt;
&lt;/saml:AudienceRestriction&gt;
&lt;/saml:Conditions&gt;
&lt;saml:AuthnStatement AuthnInstant="2017-06-28T13:39:27.332Z"
SessionIndex="9b6a46b9-28f2-4ce1-b151-713240520e5d"&gt;
&lt;saml:AuthnContext&gt;
&lt;saml:AuthnContextClassRef&gt;urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified&lt;/saml:AuthnContextClassRef&gt;
&lt;/saml:AuthnContext&gt;
&lt;/saml:AuthnStatement&gt;
&lt;saml:AttributeStatement&gt; <i class="conum" data-value="16"></i><b>(16)</b>
&lt;saml:Attribute FriendlyName="List of groups" <i class="conum" data-value="17"></i><b>(17)</b>
Name="groups"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" <i class="conum" data-value="18"></i><b>(18)</b>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;ipausers&lt;/saml:AttributeValue&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" <i class="conum" data-value="18"></i><b>(18)</b>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;openstack-users&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute FriendlyName="email"
Name="email"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"`&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;jdoe@music.com&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute FriendlyName="Display Name"
Name="display_name"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;John Doe&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute FriendlyName="initials"
Name="initials"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;JD&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute FriendlyName="Last Name"
Name="last_name"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;Doe&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute FriendlyName="First Name"
Name="first_name"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;John&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute Name="Role"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;uma_authorization&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute Name="Role"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;manage-account&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute Name="Role"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string"&gt;view-profile&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;/saml:AttributeStatement&gt;
&lt;/saml:Assertion&gt;
&lt;/samlp:Response&gt;</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td><code>Response</code>: The <code>&lt;Response&gt;</code> element contains the entire SAML
response, which includes information concerning who issued the
response, when the response was issued, optionally a signature on the
response, and the actual response contents which in this case is an
<code>&lt;Assertion&gt;</code>.</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td><code>Destination</code>: The <em>AssertionConsumerService</em> endpoint where this
response will be sent. The receiver will verify it arrived at this
location or it will reject it.</td>
</tr>
<tr>
<td><i class="conum" data-value="3"></i><b>3</b></td>
<td><code>ID</code>: Unique ID generated by Mellon to identify the SAML
request. It will appear in the SAML response in the <code>InResponseTo</code>
attribute. Used to correlate SAML request and responses.</td>
</tr>
<tr>
<td><i class="conum" data-value="4"></i><b>4</b></td>
<td><code>InResponseTo</code>: This identifies the SAML request being responded
to. It matches the <code>ID</code> attribute in the
<a href="#authentication_request">&lt;AuthnRequest&gt; Example</a>. This is how SAML requests and responses are
associated with one another as a pair.</td>
</tr>
<tr>
<td><i class="conum" data-value="5"></i><b>5</b></td>
<td><code>IssueInstant</code>: Timestamp of when response was made.</td>
</tr>
<tr>
<td><i class="conum" data-value="6"></i><b>6</b></td>
<td><code>Issuer</code>: The IdP which is issuing this response. It is the
<a href="#entityID">entityID</a> of the IdP as defined in the <a href="#idp_metadata">Identity Provider Metadata</a>.</td>
</tr>
<tr>
<td><i class="conum" data-value="7"></i><b>7</b></td>
<td><code>Signature</code>: This response is signed by the IdP. The signature
information is contained in this XML element.</td>
</tr>
<tr>
<td><i class="conum" data-value="8"></i><b>8</b></td>
<td><code>Reference</code>: Identifies the XML element being signed. In this
instance since the signature reference points to the top level
<code>&lt;samlp:Response&gt;</code> the entire response is signed.</td>
</tr>
<tr>
<td><i class="conum" data-value="9"></i><b>9</b></td>
<td><code>Status</code>: The status of the SAML response. Because in this
instance the status is <code>urn:oasis:names:tc:SAML:2.0:status:Success</code>,
the authentication was successful. If it had not been, an error status
would have been returned. <strong>The &lt;Status&gt; element is where to look for the
success or failure of a SAML request.</strong></td>
</tr>
<tr>
<td><i class="conum" data-value="10"></i><b>10</b></td>
<td><code>Assertion</code>: This begins the assertion data. It represents the
<em>content</em> of the SAML response.</td>
</tr>
<tr>
<td><i class="conum" data-value="11"></i><b>11</b></td>
<td><code>Issuer</code>: The IdP which is issuing this response. It is the
<a href="#entityID">entityID</a> of the IdP as defined in the <a href="#idp_metadata">Identity Provider Metadata</a></td>
</tr>
<tr>
<td><i class="conum" data-value="12"></i><b>12</b></td>
<td><code>Signature</code>: The signature on the <code>&lt;Assertion&gt;</code>. Note this is
independent of the signature on the response.</td>
</tr>
<tr>
<td><i class="conum" data-value="13"></i><b>13</b></td>
<td><code>Reference</code>: Identifies the XML element being signed. In this
instance the signature reference points to the <code>&lt;Assertion&gt;</code> element,
because that element has the matching <code>ID</code> attribute.</td>
</tr>
<tr>
<td><i class="conum" data-value="14"></i><b>14</b></td>
<td><code>Subject</code>: This begins the <code>&lt;Subject&gt;</code> element which identifies
the principal being authenticated in this <code>&lt;Assertion&gt;</code>.</td>
</tr>
<tr>
<td><i class="conum" data-value="15"></i><b>15</b></td>
<td><code>NameID</code>: <strong>This is where Mellon obtains the username in the
assertion.</strong> Because the format is <code>transient</code> it is a random value
assigned by the IdP. Note the <code>MELLON_NAME_ID</code> in the Apache
environment exactly matches this. See <a href="#name_id">Username, userid, SAML NameID</a> for more details.</td>
</tr>
<tr>
<td><i class="conum" data-value="16"></i><b>16</b></td>
<td><code>AttributeStatement</code>: This begins the <strong>set of attributes</strong> supplied
by the IdP.</td>
</tr>
<tr>
<td><i class="conum" data-value="17"></i><b>17</b></td>
<td><code>Attribute</code>: This is the attribute whose <code>name</code> is <em>groups</em>. It is a
multi-valued attribute because it contains 2 <code>&lt;AttributeValue&gt;</code>
elements. This attribute could be written in pseudo-code as
<code>groups=["ipausers","openstack-users"]</code>.</td>
</tr>
<tr>
<td><i class="conum" data-value="18"></i><b>18</b></td>
<td><code>AttributeValue</code>: These are the values for the attribute. In this
instance there are 2 values, <em>ipausers</em> and <em>openstack-users</em>.</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>The above <code>&lt;Assertion&gt;</code> response is conveyed back to the SP using the
<em>HTTP Post Binding</em>. You may wish to review <a href="#http_post">HTTP Post and Self-Posting</a>. The "on the
wire" version of this <code>&lt;Assertion&gt;</code> response and its associated
parameters can be seen in <a href="#assertion_response_wire">Example On-the-Wire &lt;Assertion&gt; response</a>. Once again we see
the need for SAML tools because it is impossible to view the XML
message and its associated parameters give the contents of the HTTP
response.</p>
</div>
</div>
<div class="sect2">
<h3 id="endpoints">4.11. SAML Endpoints</h3>
<div class="paragraph">
<p>When two SAML providers communicate they must know the URL to send a
given SAML message to. The set of URLs where a provider receives SAML
messages is often referred to as its SAML endpoints. Although a SAML
endpoint may appear in a SAML message, this is <strong>not sufficient</strong> to
identify where a response should be sent. This is because a nefarious
sender could insert a bogus location in the message. To assure SAML
messages are only exchanged between the expected parties, the message
endpoints are established outside of the message exchange via a
trusted mechanism when a relationship is initially established between
the two providers. Although not mandated, this is almost always
accomplished via the exchange of SAML <a href="#metadata">metadata</a> forming a
trust relationship between the two providers. The presence of a SAML
endpoint in a SAML message is typically there to validate the message
against the previously established trust information. Also as you will
learn below, an endpoint must be paired with a binding type, which is
another reason why an endpoint appearing in a SAML message is not
sufficient to establish a communication pathway.</p>
</div>
<div class="paragraph">
<p>A SAML endpoint is defined by a (service,binding)
pair. The service component identifies what action is hosted by this
endpoint. Examples of common SAML services you are likely to encounter
are:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">SingleSignOnService</dt>
<dd>
<p>Authenticate a user and establish a session for them. This is an IdP
service, it&#8217;s where a SP sends its <code>&lt;AuthnRequest&gt;</code> message.</p>
</dd>
<dt class="hdlist1">AssertionConsumerService</dt>
<dd>
<p>This is where SPs receive <code>&lt;Assertion&gt;</code> messages from an IdP in
response to a <code>&lt;AuthnRequest&gt;</code> message.</p>
</dd>
<dt class="hdlist1">SingleLogoutService</dt>
<dd>
<p>Terminate a user&#8217;s session by logging them out. Both SPs and IdPs
support this.</p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>The binding component of a (service,binding) pair identifies the format
of the message. Recall that SAML offers many different ways to encode
the XML of a SAML message. The binding component allows the receiver
to know how to decode and parse the SAML message back into an XML SAML
document received at its service endpoint.</p>
</div>
<div class="paragraph">
<p>It&#8217;s important to understand there is no requirement for a SAML
provider to locate all its (service,binding) pairs on distinct
URLs. It is possible to apply heuristics to a SAML message to
identify the binding of the message arriving on a given URL. This
allows a provider to collapse its set of endpoints into a smaller set
of URLs The choice of how a provider maps its endpoints to URLs is
entirely up to the provider. A common mistake is to assume that because
one provider does it one way all providers follow the same model. The
only way for you to know is to examine the providers metadata (see
<a href="#metadata">The Role of Metadata</a>)</p>
</div>
</div>
<div class="sect2">
<h3 id="relaystate">4.12. Relay State (How you return to the original URL)</h3>
<div class="paragraph">
<p>If you&#8217;ve ever wondered how after all the redirections, posts,
etc. involved in Web-SSO one finally returns back to the original
requested resource, you will find the answer in SAML&#8217;s <code>RelayState</code>
parameter. The <code>RelayState</code> is set by the SP when it first initiates
authentication. SAML requires every party that handles a SAML message
to preserve the <code>RelayState</code> and ultimately return it to the original
requester. Officially SAML constrains the <code>RelayState</code> to a maximum of
80 bytes and recommends it be integrity protected and not expose
sensitive information because it often appears in the URL of SAML
messages. This could be achieved by pairing the URL with a random
string, using the random string as the <code>RelayState</code>, and then obtaining the
original URL by performing a look-up. However in practice most SAML
clients set the <code>RelayState</code> to the resource URL. This is what Mellon
currently does.</p>
</div>
<div class="paragraph">
<p>When you are examining SAML messages, the <code>RelayState</code> will be the
original URL and depending on the SAML binding it may be
URL-encoded. <em>Just be aware that there is no requirement the <code>RelayState</code> be
the original URL. It can be any string that the client can use
to establish the context.</em> At some future date Mellon may alter its
<code>RelayState</code> handling.</p>
</div>
</div>
<div class="sect2">
<h3 id="metadata">4.13. The Role of Metadata</h3>
<div class="paragraph">
<p>When a SAML provider needs to interact with another SAML provider they
must know various properties of the foreign provider (i.e. its
configuration). SAML provider properties are encapsulated in an XML
document called SAML metadata. Examples of the provider properties
conveyed in metadata include:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="#entityID">entityID</a> (the unique name of the provider)</p>
</li>
<li>
<p>Organizational information</p>
</li>
<li>
<p>The roles this provider offers (e.g. SP, IdP, etc.)</p>
</li>
<li>
<p><a href="#endpoints">endpoints</a> for message exchange</p>
</li>
<li>
<p>X509 certificates the provider uses and for what purpose</p>
</li>
<li>
<p>Should messages be signed</p>
</li>
<li>
<p>Attributes and attribute profiles</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Typically at start-up a provider loads its own metadata (to configure
itself) and then loads the metadata of all providers it interacts
with.</p>
</div>
<div class="paragraph">
<p>The SAML metadata specification can be found here:
<a href="https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf" class="bare">https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf</a></p>
</div>
<div class="paragraph">
<p>It is vital that SAML metadata be trusted. The SAML specifications do not
prescribe how metadata is exchanged in a trusted fashion. Many
providers offer a URL where their metadata can be downloaded from (see
<a href="#mellon_endpoints">Mellon Endpoints</a>). Metadata can be signed by the
provider, which establishes authenticity. Some SAML practitioners do
not approve of downloading metadata and instead insist upon the
private exchange of metadata as a means to assure the metadata is
valid, thus providing a higher level of trust.</p>
</div>
<div class="paragraph">
<p><strong>Practical field experience has demonstrated that the vast majority of SAML
problems are due to invalid metadata. Therefore the ability to
diagnose SAML problems demands the ability to read and understand SAML
metadata.</strong></p>
</div>
<div class="paragraph">
<p>To that end let&#8217;s explore the provider metadata used in our examples.</p>
</div>
<div class="sect3">
<h4 id="metadata_keys">4.13.1. Certs and Keys Inside Metadata</h4>
<div class="paragraph">
<p>Cryptographic keys are used in SAML to sign pieces of data providing
integrity protection and to encrypt data to provide
confidentiality. In order for two SAML providers to successfully
exchange SAML messages between themselves they must know the public
keys of the other party. The provider&#8217;s public keys are declared in
its metadata and are always encapsulated inside a
<code>&lt;md:KeyDescriptor&gt;</code> element that defines its intended use (signing
or encryption). Furthermore one or more of the following
representations within a <code>&lt;ds:KeyInfo&gt;</code> element <strong>MUST</strong> be present:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>&lt;ds:KeyValue&gt;</code></p>
</li>
<li>
<p><code>&lt;ds:X509Certificate&gt;</code> (child element of <code>&lt;ds:X509Data&gt;</code>)</p>
</li>
</ul>
</div>
<div class="paragraph">
<p><em>The (common) use of a <code>&lt;ds:X509Certificate&gt;</code> element is merely a
notational convenience to encapsulate a key. SAML never utilizes any
PKI information inside an X509 certificate; the only data SAML
utilizes from an X509 certificate is the key material.</em> This has
several implications:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Certs are never PKI validated.</p>
</li>
<li>
<p>Certification extensions that define key usage, etc. are never
checked.</p>
</li>
<li>
<p>The certificate validity period is never checked, thus a cert
contained in metadata never expires as a consequence of its
certificate validity period. Instead the validity period of the
<strong>key</strong> is controlled by the <code>&lt;md:validUntil&gt;</code> or <code>&lt;md:cacheDuration&gt;</code>
metadata attribute associated with the key.</p>
</li>
<li>
<p>Using self-signed certs used in SAML metadata is fine because the
PKI data is never evaluated.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>In fact extracting the key from an <code>&lt;ds:X509Certificate&gt;</code> element and
placing it inside a <code>&lt;ds:KeyValue&gt;</code> element instead is semantically
identical. A <code>&lt;ds:X509Certificate&gt;</code> element is just a container for the
key, nothing more than that. Certificates are used only because they
are easy to generate and are readily available.</p>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
The consequence of the above is that a provider&#8217;s metadata <strong>is</strong>
the trust mechanism in SAML. <strong><em>Any compromise of a provider&#8217;s metadata
is a compromise of SAML security.</em></strong>
</td>
</tr>
</table>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
Even though the keys and certs used inside SAML metadata
for signing and encryption are not PKI validated, the key and cert used
to establish a TLS secure channel between SAML entities <strong>MUST</strong> be
fully PKI validated using a chain all the way up to a trusted CA. Do not
confuse the purpose of the keys and certs used for the purpose of
signing and encrypting SAML data with those used to establish secure
communication: they are entirely distinct.
</td>
</tr>
</table>
</div>
</div>
<div class="sect3">
<h4 id="sp_metadata">4.13.2. Service Provider Metadata</h4>
<div class="paragraph">
<p>This is an example of Mellon metadata. It is the SP metadata used in
our example authentication.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-xml" data-lang="xml">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;EntityDescriptor <i class="conum" data-value="1"></i><b>(1)</b>
xmlns="urn:oasis:names:tc:SAML:2.0:metadata" <i class="conum" data-value="2"></i><b>(2)</b>
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" <i class="conum" data-value="2"></i><b>(2)</b>
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" <i class="conum" data-value="2"></i><b>(2)</b>
entityID="https://mellon.example.com/mellon/metadata"&gt; <i class="conum" data-value="3"></i><b>(3)</b>
&lt;SPSSODescriptor <i class="conum" data-value="4"></i><b>(4)</b>
AuthnRequestsSigned="true" <i class="conum" data-value="5"></i><b>(5)</b>
WantAssertionsSigned="true" <i class="conum" data-value="6"></i><b>(6)</b>
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt; <i class="conum" data-value="7"></i><b>(7)</b>
&lt;ds:KeyInfo&gt;
&lt;ds:X509Data&gt;
&lt;ds:X509Certificate&gt;...&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;KeyDescriptor use="encryption"&gt; <i class="conum" data-value="8"></i><b>(8)</b>
&lt;ds:KeyInfo&gt;
&lt;ds:X509Data&gt;
&lt;ds:X509Certificate&gt;...&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService <i class="conum" data-value="9"></i><b>(9)</b>
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;SingleLogoutService <i class="conum" data-value="10"></i><b>(10)</b>
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt; <i class="conum" data-value="11"></i><b>(11)</b>
&lt;AssertionConsumerService <i class="conum" data-value="12"></i><b>(12)</b>
index="0"
isDefault="true" <i class="conum" data-value="13"></i><b>(13)</b>
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com/mellon/postResponse" /&gt;
&lt;AssertionConsumerService <i class="conum" data-value="14"></i><b>(14)</b>
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com/mellon/artifactResponse" /&gt;
&lt;AssertionConsumerService <i class="conum" data-value="15"></i><b>(15)</b>
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com/mellon/paosResponse" /&gt;
&lt;/SPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td><code>EntityDescriptor</code> is a container for all properties belonging to
the entity identified by the <code>entityID</code> name. SAML metadata allows
a single metadata document to describe multiple entities. In that case
the top level element will be a <code>&lt;EntitiesDescriptor&gt;</code> element which
will contain one or more <code>&lt;EntityDescriptor&gt;</code> elements. If the
metadata describes only a single entity, it is permissible to just use
a <code>&lt;EntityDescriptor&gt;</code>.</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td>XML namespace declaration. This provides an abbreviated shorthand
to identify which namespace an XML element belongs to. The shorthand
name is the string preceding the equals sign. If the name is absent it
becomes the default namespace for XML elements which are not prefixed
with a namespace. Thus for example <code>xmlns:ds="&#8230;&#8203;"</code> sets <code>ds</code> as
the namespace prefix for XML digital signature elements and
<code>&lt;ds:KeyInfo&gt;</code> means the <code>KenInfo</code> element belongs to the XML digital
signature namespace because it is prefixed with <code>ds:</code>. <strong>There is no
prescribed list of namespace prefixes, rather the document defines the
prefix.</strong> By convention certain prefix names are commonly used. <em>A
common mistake is to assume that all SAML XML documents will use the same
namespace prefixes</em>. This is not true and leads to misunderstandings
and/or parsing errors.</td>
</tr>
<tr>
<td><i class="conum" data-value="3"></i><b>3</b></td>
<td><a id="sp_metadata_entityid"></a> entityID. This is the unique name of the SAML provider. It <strong>must</strong>
be a URI. See <a href="#entityID">entityID</a>.</td>
</tr>
<tr>
<td><i class="conum" data-value="4"></i><b>4</b></td>
<td>A provider role. In this instance the role is <code>SPSSODescriptor</code>,
which means it&#8217;s a Service Provider. A provider may have multiple
roles, therefore an entity may have more than one role element. In our
example there is only one role. See <a href="#saml_roles">SAML Roles</a>.</td>
</tr>
<tr>
<td><i class="conum" data-value="5"></i><b>5</b></td>
<td><code>AuthnRequestsSigned</code>. If true then the SP will be sending a signed
<code>&lt;AuthnRequest&gt;</code> to the IdP.</td>
</tr>
<tr>
<td><i class="conum" data-value="6"></i><b>6</b></td>
<td><code>WantAssertionsSigned</code>. If true then the SP desires the IdP to
sign its assertions. Assertions should always be signed.</td>
</tr>
<tr>
<td><i class="conum" data-value="7"></i><b>7</b></td>
<td>X509 certificate information. The <code>use</code> attribute of <code>signing</code>
identifies that this certificate will be used for signing data.
There may be multiple keys of this type, permitting key rotation.</td>
</tr>
<tr>
<td><i class="conum" data-value="8"></i><b>8</b></td>
<td>X509 certificate information. The <code>use</code> attribute of <code>encryption</code>
identifies that this certificate will be used for encrypting data.
There may be multiple keys of this type, permitting key rotation.</td>
</tr>
<tr>
<td><i class="conum" data-value="9"></i><b>9</b></td>
<td>SAML endpoint. Logout messages using a SOAP binding are sent to
this URL location.</td>
</tr>
<tr>
<td><i class="conum" data-value="10"></i><b>10</b></td>
<td>SAML endpoint. Logout messages using the HTTP-Redirect binding
are sent to this URL location.</td>
</tr>
<tr>
<td><i class="conum" data-value="11"></i><b>11</b></td>
<td>Zero or more <code>&lt;NameIDFormat&gt;</code> elements enumerate the name
identifier formats supported by this entity. See <a href="#name_id">Username, userid, SAML NameID</a> for
details.</td>
</tr>
<tr>
<td><i class="conum" data-value="12"></i><b>12</b></td>
<td><a id="sp_metadata_acs"></a> SAML endpoint. Assertions using the HTTP-POST binding are
delivered to this URL location.</td>
</tr>
<tr>
<td><i class="conum" data-value="13"></i><b>13</b></td>
<td>For indexed endpoints if <code>isDefault</code> is true then this is the
default endpoint to select. If no endpoint claims to be the default
then the first endpoint in the list is the default.</td>
</tr>
<tr>
<td><i class="conum" data-value="14"></i><b>14</b></td>
<td>SAML endpoint. Assertions using the HTTP-Artifact binding are
delivered to this URL location.</td>
</tr>
<tr>
<td><i class="conum" data-value="15"></i><b>15</b></td>
<td>SAML endpoint. Assertions using the PAOS binding are delivered to
this URL location. PAOS is used the the Enhanced Client or Proxy
Profile (a.k.a. ECP).</td>
</tr>
</table>
</div>
</div>
<div class="sect3">
<h4 id="idp_metadata">4.13.3. Identity Provider Metadata</h4>
<div class="paragraph">
<p>This is an example of a IdP metadata as generated by a Red Hat SSO
server (Keycloak). It is the IdP metadata used in our example
authentication.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-xml" data-lang="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;EntitiesDescriptor Name="urn:keycloak" <i class="conum" data-value="1"></i><b>(1)</b>
xmlns="urn:oasis:names:tc:SAML:2.0:metadata" <i class="conum" data-value="2"></i><b>(2)</b>
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt; <i class="conum" data-value="2"></i><b>(2)</b>
&lt;EntityDescriptor <i class="conum" data-value="3"></i><b>(3)</b>
entityID="https://rhsso.example.com:8443/auth/realms/test"&gt; <i class="conum" data-value="4"></i><b>(4)</b>
&lt;IDPSSODescriptor <i class="conum" data-value="5"></i><b>(5)</b>
WantAuthnRequestsSigned="true" <i class="conum" data-value="6"></i><b>(6)</b>
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt; <i class="conum" data-value="7"></i><b>(7)</b>
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;1VPndjfABB6S4lb4zwMLjBUhxfzPFnfrvNYvRgcxiUM&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;...&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService <i class="conum" data-value="8"></i><b>(8)</b>
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/test/protocol/saml" /&gt;
&lt;SingleLogoutService <i class="conum" data-value="9"></i><b>(9)</b>
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/test/protocol/saml" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&lt;/NameIDFormat&gt; <i class="conum" data-value="10"></i><b>(10)</b>
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt; <i class="conum" data-value="10"></i><b>(10)</b>
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDFormat&gt; <i class="conum" data-value="10"></i><b>(10)</b>
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/NameIDFormat&gt; <i class="conum" data-value="10"></i><b>(10)</b>
&lt;SingleSignOnService <i class="conum" data-value="11"></i><b>(11)</b>
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/test/protocol/saml" /&gt;
&lt;SingleSignOnService <i class="conum" data-value="12"></i><b>(12)</b>
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/test/protocol/saml" /&gt;
&lt;SingleSignOnService <i class="conum" data-value="13"></i><b>(13)</b>
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://rhsso.example.com:8443/auth/realms/test/protocol/saml" /&gt;
&lt;/IDPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
&lt;/EntitiesDescriptor&gt;</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td><code>EntitiesDescriptor</code> is a container for multiple
<code>&lt;EntityDesciptor&gt;</code> elements.</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td>XML namespace declaration. This provides an abbreviated shorthand
to identify which namespace an XML element belongs to. The shorthand
name is the string preceding the equals sign. If the name is absent it
becomes the default namespace for XML elements which are not prefixed
with a namespace. Thus for example <code>xmlns:ds="&#8230;&#8203;"</code> sets <code>ds</code> as
the namespace prefix for XML digital signature elements and
<code>&lt;ds:KeyInfo&gt;</code> means the <code>KeyInfo</code> element belongs to the XML digital
signature namespace because it is prefixed with <code>ds:</code>. <strong>There is no
prescribed list of namespace prefixes, rather the document defines the
prefix.</strong> By convention certain prefix names are commonly used. <em>A
common mistake is to assume all SAML XML documents will use the same
namespace prefixes</em>. This is not true and leads to misunderstandings
and/or parsing errors.</td>
</tr>
<tr>
<td><i class="conum" data-value="3"></i><b>3</b></td>
<td><code>EntityDescriptor</code> is a container for all properties belonging to
the entity identified by the <code>entityID</code> name.</td>
</tr>
<tr>
<td><i class="conum" data-value="4"></i><b>4</b></td>
<td>entityID. This is the unique name of the SAML provider. It <strong>must</strong>
be a URI. See <a href="#entityID">entityID</a>.</td>
</tr>
<tr>
<td><i class="conum" data-value="5"></i><b>5</b></td>
<td>A provider role. In this instance the role is <code>IDPSSODescriptor</code>,
which means it&#8217;s an Identity Provider. A provider may have multiple
roles, therefore an entity may have more than one role element. In our
example there is only one role. See <a href="#saml_roles">SAML Roles</a>.</td>
</tr>
<tr>
<td><i class="conum" data-value="6"></i><b>6</b></td>
<td><code>WantAuthnRequestsSigned</code>. If true, indicates that this IdP requires
every <code>&lt;AuthnRequest&gt;</code> submitted by an SP to be signed.</td>
</tr>
<tr>
<td><i class="conum" data-value="7"></i><b>7</b></td>
<td>X509 certificate information. The <code>use</code> attribute of <code>signing</code>
identifies that this certificate will be used for signing data.
There may be multiple keys of this type, permitting key rotation.</td>
</tr>
<tr>
<td><i class="conum" data-value="8"></i><b>8</b></td>
<td>SAML endpoint. Logout messages using the HTTP-POST binding are
sent to this URL location.</td>
</tr>
<tr>
<td><i class="conum" data-value="9"></i><b>9</b></td>
<td>SAML endpoint. Logout messages using the HTTP-Redirect binding are
sent to this URL location.</td>
</tr>
<tr>
<td><i class="conum" data-value="10"></i><b>10</b></td>
<td>Zero or more <code>&lt;NameIDFormat&gt;</code> elements enumerate the name
identifier formats supported by this entity. See <a href="#name_id">Username, userid, SAML NameID</a> for more
details.</td>
</tr>
<tr>
<td><i class="conum" data-value="11"></i><b>11</b></td>
<td>SAML endpoint. <code>&lt;AuthnRequest&gt;</code> messages using the HTTP-POST
binding are sent by the SP to this URL location to establish a Single
Sign-On Session.</td>
</tr>
<tr>
<td><i class="conum" data-value="12"></i><b>12</b></td>
<td>SAML endpoint. <code>&lt;AuthnRequest&gt;</code> messages using the HTTP-Redirect
binding are sent by the SP to this URL location to establish a Single
Sign-On Session.</td>
</tr>
<tr>
<td><i class="conum" data-value="13"></i><b>13</b></td>
<td>SAML endpoint. <code>&lt;AuthnRequest&gt;</code> messages using the SOAP
binding are sent by the SP to this URL location to establish a Single
Sign-On Session.</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_installing_configuring_mellon">5. Installing &amp; Configuring Mellon</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_installing_mellon">5.1. Installing Mellon</h3>
<div class="paragraph">
<p>Mellon can be built and installed from source code located in the
<a href="https://github.com/UNINETT/mod_auth_mellon">mod_auth_mellon GitHub
repository</a>. However for most people the best option is to install
Mellon using a pre-built package available from the package manager on
your operating system. Pre-built packages relieve you of having to
know the intricacies of building and installing from source, track and
install security fixes, and track and apply bug fixes. Pre-built
packages also are tailored to your operating system environment, often
including OS specific configuration and support files deemed useful by
the packaging authority.</p>
</div>
<div class="listingblock">
<div class="title">On RHEL (CentOS)</div>
<div class="content">
<pre>sudo yum install mod_auth_mellon</pre>
</div>
</div>
<div class="listingblock">
<div class="title">On Fedora</div>
<div class="content">
<pre>sudo dnf install mod_auth_mellon</pre>
</div>
</div>
<div class="listingblock">
<div class="title">On Debian (Ubuntu)</div>
<div class="content">
<pre>apt-get install libapache2-mod-auth-mellon</pre>
</div>
</div>
<div class="listingblock">
<div class="title">From source</div>
<div class="content">
<pre>./configure
make
sudo make install</pre>
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
If building from source you&#8217;ll need to have all the necessary
dependencies available at build time. Determining the exact set of
dependencies and where to locate them is operating system
dependent. It is assumed you have the necessary knowledge to correctly
perform the requisite operations which is out of scope for this document.
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="mellon_config">5.2. Mellon Configuration</h3>
<div class="paragraph">
<p>Once installed, mod_auth_mellon does not do anything until it&#8217;s
configured to operate on a URL. Mellon is configured in the same way
as other Apache modules. See
<a href="http://httpd.apache.org/docs/current/configuring.html">Apache
Configuration Files</a>.</p>
</div>
<div class="paragraph">
<p>There are two independent steps necessary to enable Mellon.</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Load the mod_auth_mellon Apache module at Apache start-up.</p>
</li>
<li>
<p>Configure Mellon to operate on specific URLs with specific SAML
properties.</p>
</li>
</ol>
</div>
<div class="sect3">
<h4 id="load_mod_auth_mellon">5.2.1. Load mod_auth_mellon</h4>
<div class="paragraph">
<p>To accomplish the first task of loading the mod_auth_mellon module
Apache needs to execute this configuration directive:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>LoadModule auth_mellon_module modules/mod_auth_mellon.so</pre>
</div>
</div>
<div class="paragraph">
<p>Different distributions may handle Apache module loading differently, but as
of Apache 2.4 the preferred technique is to drop a file in the
<code>conf.modules.d</code> Apache directory with the above content. Apache
automatically processes all <code>.conf</code> files in this directory at
start-up.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="title">Red Hat Specific</div>
<div class="paragraph">
<p>Red Hat RPM&#8217;s add the file
<code>/etc/httpd/conf.modules.d/10-auth_mellon.conf</code> with the above
<code>LoadModule</code> directive, so there is no further action needed to load
the module after the RPM is installed.</p>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="sect3">
<h4 id="mellon_config_files">5.2.2. Mellon Configuration Files</h4>
<div class="paragraph">
<p>To accomplish the second task of configuring Mellon, Apache will need
to read Mellon configuration directives when it initializes. The
preferred mechanism is to place those directives in a file located in
the Apache <code>conf.d</code> directory, Apache will read all <code>.conf</code> files in
this directory at start-up. Although you could place the Mellon
directives in any config file, a good practice to follow is keep the
Mellon directives in their own file. See <a href="#mellon_config_file">Mellon Configuration File</a> for
more information.</p>
</div>
<div class="paragraph">
<p>Mellon relies on SAML specific files as well, for example:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>IdP metadata file(s)</p>
</li>
<li>
<p>Mellon&#8217;s SP metadata file</p>
</li>
<li>
<p>Certificate and key files</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Although you are free to locate these SAML specific files in the
<code>/etc/httpd/conf.d</code> Apache configuration directory, they are not
strictly speaking Apache configuration files. Many deployments choose
to locate the SAML files in a sibling directory, for example
<code>/etc/httpd/saml2</code>.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
If you are running with SELinux enabled (as you should be) you
may run into SELinux file permission problems if you locate files
Mellon reads and writes outside the standard Apache directories
because externally located files will not automatically receive the
proper SELinux labels.
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_mellon_configuration_directives">5.3. Mellon Configuration Directives</h3>
<div class="paragraph">
<p>Mellon&#8217;s configuration directives are documented in Mellon&#8217;s <code>README</code>
file. The README is the best place to learn and review Mellon
configuration directives because it will match the installed version
of Mellon.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="title">Red Hat Specific</div>
<div class="paragraph">
<p>Red Hat RPM&#8217;s install the README file in
<code>/usr/share/doc/mod_auth_mellon*/README</code>.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Mellon configuration directives are broken into 2 types:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Module level (i.e. global values shared by each virtual server)</p>
</li>
<li>
<p>Directory level (i.e. applied to directories and URL locations)</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The README groups all module level directives together at the top of
the file, the directory level directory level directives follow. Most
users will only need to configure the directory level directives which
comprise 2 basic types and are documented in <a href="http://httpd.apache.org/docs/current/mod/core.html">Apache Core Features</a>:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">&lt;Directory&gt; Directive</dt>
<dd>
<p>Enclose a group of directives that apply only
to the named file-system directory, sub-directories, and their
contents.</p>
</dd>
<dt class="hdlist1">&lt;Location&gt; Directive</dt>
<dd>
<p>Applies the enclosed directives only to
matching URLs.</p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>The critical thing to remember when writing and reading Mellon
configuration is that like all Apache directory level configuration it is
<strong><em>hierarchical</em></strong>. The path portion of the URL is like a file system
directory tree. If a Mellon configuration directive is not
<em>explicitly</em> defined for a particular point in the tree, the value is
<strong><em>inherited</em></strong> from the closest ancestor that defines it. If no
ancestor defines the value then Mellon&#8217;s default value is applied. The
default value for each Mellon configuration directive is listed in
Mellon&#8217;s <code>README</code> file.</p>
</div>
</div>
<div class="sect2">
<h3 id="mellon_config_file">5.4. Mellon Configuration File</h3>
<div class="paragraph">
<p>For our demo example we will place these directives in the file
<code>/etc/httpd/conf.d/demo_mellon.conf</code>. Let&#8217;s briefly review what the
demo configuration is meant to accomplish and illustrate:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>We are protecting with SAML authentication the URL location
<code><a href="https://mellon.example.com/private" class="bare">https://mellon.example.com/private</a></code> and everything below it in URL
space.</p>
</li>
<li>
<p>To eliminate redundant cut-n-paste of shared SAML directives in each
protected location we gather the common Mellon directives in a
location <em>above</em> any of the protected locations in the URL
tree. This permits all protected locations to hierarchically inherit
the same values from a common single set of directives.</p>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre>&lt;Location /&gt; <i class="conum" data-value="1"></i><b>(1)</b>
MellonEnable info <i class="conum" data-value="2"></i><b>(2)</b>
MellonEndpointPath /mellon/ <i class="conum" data-value="3"></i><b>(3)</b>
MellonSPMetadataFile /etc/httpd/saml2/demo_sp_metadata.xml <i class="conum" data-value="4"></i><b>(4)</b>
MellonSPPrivateKeyFile /etc/httpd/saml2/demo.key <i class="conum" data-value="5"></i><b>(5)</b>
MellonSPCertFile /etc/httpd/saml2/demo.cert <i class="conum" data-value="6"></i><b>(6)</b>
MellonIdPMetadataFile /etc/httpd/saml2/demo_keycloak_test_idp_metadata.xml <i class="conum" data-value="7"></i><b>(7)</b>
&lt;/Location&gt;
&lt;Location /private&gt; <i class="conum" data-value="8"></i><b>(8)</b>
AuthType Mellon <i class="conum" data-value="9"></i><b>(9)</b>
MellonEnable auth <i class="conum" data-value="10"></i><b>(10)</b>
Require valid-user <i class="conum" data-value="11"></i><b>(11)</b>
&lt;/Location&gt;</pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>The first <code>Location</code> directive on the <code>/</code> <em>root</em> is simply a
convenient place to locate common configuration directives that will
be shared by all Mellon protected locations. In this instance it
defines the metadata files and certificates and keys. It is not
necessary to locate this on the <code>/</code> <em>root</em> URL, in fact in a real
world deployment you probably will want to locate the common shared
set of Mellon directives lower in the hierarchy. The only requirement
is that <em>all</em> of the protected locations are positioned below it so they may
inherit those values. <sup class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnote_1" title="View footnote.">1</a>]</sup></td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td>Mellon does not process any directives unless it&#8217;s enabled for
that location either explicitly or via inheritance. See
<a href="#mellon_modes">Mellon Modes</a> for more details.</td>
</tr>
<tr>
<td><i class="conum" data-value="3"></i><b>3</b></td>
<td>Defines where the Mellon endpoints are located in URL space. This
is a <strong>critical</strong> value to properly specify and is one of the <strong><em>most
common Mellon configuration errors</em></strong> leading to a failed deployment.
Please refer to <a href="#mellon_endpoint_path">MellonEndpointPath</a> to
understand its requirements and what it influences. Also see
<a href="#incorrect_mellon_endpoint_path">Incorrect MellonEndpointPath</a> for a discussion of this common
error. The important thing to note in this example is the
<code>MellonEndpointPath</code> is located <strong>inside</strong> the containing location
directive of <code>/</code> (e.g. a child).</td>
</tr>
<tr>
<td><i class="conum" data-value="4"></i><b>4</b></td>
<td>The SAML metadata for this provider (i.e. Mellon&#8217;s metadata). This
metadata plays 2 important roles: Mellon reads it at start-up to
initialize itself, and you provide the IdP specified in
<code>MellonIdPMetadataFile</code> with this metadata. Both Mellon (the SP) and
your IdP <strong>MUST</strong> have loaded exactly the same Mellon metadata in other
to interoperate. Out of sync metadata is a very common deployment
error. See <a href="#metadata_creation">Metadata Creation</a> for how Mellon
metadata is created. <code>MellonSPMetadataFile</code> is optional, Mellon can
create its own metadata from its initial configuration parameters.</td>
</tr>
<tr>
<td><i class="conum" data-value="5"></i><b>5</b></td>
<td>The private cryptographic key used by Mellon to sign its SAML
data. See <a href="#metadata_keys">Certs and Keys Inside Metadata</a> for more detail.</td>
</tr>
<tr>
<td><i class="conum" data-value="6"></i><b>6</b></td>
<td>The public cryptographic key associated with the private key. This
public key is embedded in Mellon&#8217;s metadata so that an IdP can
validate Mellon&#8217;s signed data. See <a href="#metadata_keys">Certs and Keys Inside Metadata</a> for more detail.</td>
</tr>
<tr>
<td><i class="conum" data-value="7"></i><b>7</b></td>
<td>The IdP used to authenticate is specified by its metadata
file. See <a href="#obtain_idp_metadata">Obtaining IdP Metadata</a> for how to obtain this data.</td>
</tr>
<tr>
<td><i class="conum" data-value="8"></i><b>8</b></td>
<td>This is a URL location protected by Mellon. For our example we&#8217;ve
used the <code>/private</code> URL. Note that this <code>&lt;Location&gt;</code> block is simple and
does not contain many of the necessary Mellon directives, because those other
Mellon directives are inherited from an ancestor location, in our
example <code>/</code>. The only Mellon directives in this location block are
those necessary to turn on Mellon authentication. This configuration
strategy permits you to define many subordinate protected locations all
sharing the same common Mellon directives via inheritance.</td>
</tr>
<tr>
<td><i class="conum" data-value="9"></i><b>9</b></td>
<td><code>AuthType</code> is an Apache directive specifying which Apache
authentication module will perform the authentication for this
location. Obviously we want to use Mellon.</td>
</tr>
<tr>
<td><i class="conum" data-value="10"></i><b>10</b></td>
<td>Instruct Mellon that this location (and all its descendants) will be
authenticated. See <a href="#mellon_modes">Mellon Modes</a>.</td>
</tr>
<tr>
<td><i class="conum" data-value="11"></i><b>11</b></td>
<td><code>Require</code> is an Apache directive that instructs Apache&#8217;s
authentication and authorization sub-system that it must successfully
authenticate the user.</td>
</tr>
</table>
</div>
<div class="sect3">
<h4 id="load_sp_metadata_into_idp">5.4.1. Load Your SP metadata into the IdP</h4>
<div class="paragraph">
<p>After you have created your SP metadata as described in
<a href="#metadata_creation">Metadata Creation</a>, you must load your metadata
into the IdP referenced in your <code>MellonIdPMetadataFile</code>. How to
perform the SP metadata load is specific to the IdP you&#8217;re using and
you will need to consult your IdP documentation to learn the procedure.</p>
</div>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
If you subsequently modify your SP metadata you <strong>MUST</strong> reload
it into the IdP. Both your metadata and the IdP metadata must be in
sync at all times. Failure to reload any modified metadata is a recipe
for problems.
</td>
</tr>
</table>
</div>
</div>
<div class="sect3">
<h4 id="obtain_idp_metadata">5.4.2. Obtaining IdP Metadata</h4>
<div class="paragraph">
<p>In order to Mellon to communicate with and interoperate with an IdP it
must have the IdP&#8217;s metadata. You may want to refer to <a href="#metadata">The Role of Metadata</a> for
a more comprehensive description. But how do you obtain the metadata
belonging to the IdP? There is no fixed rule on how this is
accomplished. You will have to refer to your IdP&#8217;s documentation. It
may be published at a well known location (e.g. a URL) for download or
there may be some other publication mechanism.</p>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
SAML provider metadata is extremely security sensitive, it
contains the cryptographic keys used to secure SAML. If you download
metadata from a URL do so only over a secure channel such as https and
make sure the download operation properly validates the server cert up
to a CA you trust. <em>Do not trust a server offering a self-signed
cert</em>. If the obtained metadata is signed you <strong>MUST</strong> validate the
signature on the metadata.
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect2">
<h3 id="mellon_modes">5.5. Mellon Modes</h3>
<div class="paragraph">
<p>For any given location Mellon can be in one of 3 modes defined by the
<code>MellonEnable</code> directive:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">off</dt>
<dd>
<p>Mellon will not do anything in this location.
This is the default state.</p>
</dd>
<dt class="hdlist1">info</dt>
<dd>
<p>If the user is authorized to access the resource, then
Mellon will populate the environment with information about
the user. If the user isn&#8217;t authorized, then Mellon won&#8217;t
populate the environment, but Mellon won&#8217;t deny the user
access either.</p>
</dd>
<dt class="hdlist1">auth</dt>
<dd>
<p>Mellon will populate the environment with information about
the user if he is authorized. If he is authenticated
(logged in), but not authorized (according to the
<code>MellonRequire</code> and <code>MellonCond</code> directives, then Mellon will
return a 403 Forbidden error. If he isn&#8217;t authenticated
then Mellon will redirect to the login page of the configured IdP.</p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>The most common situation is to protect a specific location with
Mellon authentication. This requires at a minimum these 3 directives:</p>
</div>
<div class="listingblock">
<div class="content">
<pre> AuthType Mellon <i class="conum" data-value="1"></i><b>(1)</b>
MellonEnable auth <i class="conum" data-value="2"></i><b>(2)</b>
Require valid-user <i class="conum" data-value="3"></i><b>(3)</b></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>This is an Apache directive that says authentication is to be
performed with Mellon as opposed to another Apache authentication
module.</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td>This informs Mellon it is to perform authentication as described
above.</td>
</tr>
<tr>
<td><i class="conum" data-value="3"></i><b>3</b></td>
<td>This is an Apache directive that says an authentication module
must have successfully authenticated a user in order to proceed.</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="metadata_creation">5.6. How is Mellon metadata created?</h3>
<div class="paragraph">
<p>The purpose of SAML metadata is describe in <a href="#metadata">The Role of Metadata</a>. An annotated
example of Mellon metadata is presented in <a href="#sp_metadata">Service Provider Metadata</a>. There are
multiple ways one can create Mellon metadata:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Use the <code>mellon_create_metadata.sh</code> script. The mod_auth_mellon RPM
installs this script in
<code>/usr/libexec/mod_auth_mellon/mellon_create_metadata.sh</code>.</p>
</li>
<li>
<p>Allow Mellon to dynamically generate its metadata based on its
configuration options. The metadata can be downloaded from the
<code>$MellonEndpointPath/metadata</code> URL. Mellon only self-generates its
metadata if the <code>MellonSPMetadataFile</code> configuration parameter is not
defined, otherwise if the <code>MellonSPMetadataFile</code> is defined the
<code>$MellonEndpointPath/metadata</code> download URL will return the contents
of the <code>MellonSPMetadataFile</code>.</p>
</li>
<li>
<p>Use a third-party tool such as <code>keycloak-http-client-install</code>.</p>
</li>
<li>
<p>Write it from scratch. (Not kidding, many provider administrators
hand create and hand edit their metadata).</p>
</li>
</ol>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
Before proceeding further with Mellon metadata it is
essential you understand the <a href="#mellon_endpoint_path">MellonEndpointPath</a>.
</td>
</tr>
</table>
</div>
<div class="sect3">
<h4 id="using_mellon_create_metadata_sh">5.6.1. Using <code>mellon_create_metadata.sh</code></h4>
<div class="paragraph">
<p><code>mellon_create_metadata.sh</code> requires two positional parameters</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="#entityID">entityID</a></p>
</li>
<li>
<p>endpoint_url</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The entityID is the unique name of the Mellon SP. The entityID plays
an important role in SAML and you may wish to review its description
in <a href="#entityID">entityID</a>.</p>
</div>
<div class="paragraph">
<p>The endpoint_url is the concatenation of the <code>https</code> scheme, the Mellon
hostname, and the <a href="#mellon_endpoint_path">MellonEndpointPath</a>.</p>
</div>
<div class="paragraph">
<p>Using our example data the entityID will be
<code><a href="https://mellon.example.com/mellon/metadata" class="bare">https://mellon.example.com/mellon/metadata</a></code> and the endpoint_url will
be <code><a href="https://mellon.example.com/mellon" class="bare">https://mellon.example.com/mellon</a></code></p>
</div>
<div class="listingblock">
<div class="content">
<pre>$ /usr/libexec/mod_auth_mellon/mellon_create_metadata.sh "https://mellon.example.com/mellon/metadata" "https://mellon.example.com/mellon"
Output files:
Private key: https_mellon.example.com_mellon_metadata.key
Certificate: https_mellon.example.com_mellon_metadata.cert
Metadata: https_mellon.example.com_mellon_metadata.xml
Host: mellon.example.com
Endpoints:
SingleLogoutService (SOAP): https://mellon.example.com/mellon/logout
SingleLogoutService (HTTP-Redirect): https://mellon.example.com/mellon/logout
AssertionConsumerService (HTTP-POST): https://mellon.example.com/mellon/postResponse
AssertionConsumerService (HTTP-Artifact): https://mellon.example.com/mellon/artifactResponse
AssertionConsumerService (PAOS): https://mellon.example.com/mellon/paosResponse</pre>
</div>
</div>
<div class="paragraph">
<p>The script produces 3 files containing the cert, key, and metadata, all
prefixed with the entityID. In this example it would be:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>https_mellon.example.com_mellon_metadata.cert</p>
</li>
<li>
<p>https_mellon.example.com_mellon_metadata.key</p>
</li>
<li>
<p>https_mellon.example.com_mellon_metadata.xml</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>You will need to move these files into the Apache configuration
directory and possibly rename them to something more sensible. You will refer to
these files inside the Mellon
configuration as these Mellon directives:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>MellonSPPrivateKeyFile</code></p>
</li>
<li>
<p><code>MellonSPCertFile</code></p>
</li>
<li>
<p><code>MellonSPMetadataFile</code></p>
</li>
</ul>
</div>
</div>
<div class="sect3">
<h4 id="using_mellon_to_create_metadata">5.6.2. Using Mellon to generate its own metadata</h4>
<div class="paragraph">
<p>Mellon has the built-in capability to generate its own metadata as
long as you provide a few necessary Mellon configuration directives.</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>MellonSPentityId</code></p>
</li>
<li>
<p><code>MellonSPPrivateKeyFile</code></p>
</li>
<li>
<p><code>MellonSPCertFile</code></p>
</li>
<li>
<p><code>MellonEndpointPath</code> (not mandatory if you use the default)</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>When Mellon initializes it will check the value of the
<code>MellonSPMetadataFile</code>. If it does not exist Mellon will generate
its own metadata. If <code>MellonSPMetadataFile</code> exists, that metadata will
always be used. If Mellon generates its own metadata it does not
write the metadata back to a file, rather it&#8217;s held in memory.</p>
</div>
<div class="paragraph">
<p>Irrespective of whether Mellon self generates its metadata or if it
loads it from a file specified by <code>MellonSPMetadataFile</code>, the metadata
is made available for download at the <code>$MellonEndpointPath/metadata</code>
URL. You can perform a GET on this URL to capture the SP metadata and
save it in a file. It is recommended you do this as an initial
configuration set-up step and then always subsequently load the
metadata via the <code>MellonSPMetadataFile</code> directive. The rationale for
this is you want to be sure you know what metadata Mellon is
initializing with and that it identically matches what you&#8217;ve loaded
into the IdP. You may also wish to customize your SP metadata by
making edits to it.</p>
</div>
</div>
<div class="sect3">
<h4 id="_where_do_the_keys_and_certs_come_from">5.6.3. Where do the keys and certs come from?</h4>
<div class="paragraph">
<p>Please refer to the <a href="#metadata_keys">Certs and Keys Inside Metadata</a> section to understand how keys
and certs are utilized inside SAML (TLS connections used for SAML
communication is an entirely different matter and it is mandated keys
and certs used for TLS be PKI validated). The main point to
understand is that even though most SAML implementations use x509 utilities
to generate certs and keys, SAML&#8217;s use of them does not involve PKI.
Only the key material is used. The consequence of this is it&#8217;s
okay to generate self-signed certs for use inside a provider&#8217;s metadata
because they are not PKI validated. Many of the metadata creation
tools generate a self-signed cert for use in the metadata. However it
is perfectly fine to use your own key and cert instead of one
generated by an installation tool. You can accomplish this with Mellon
by pointing the <code>MellonSPPrivateKeyFile</code> and <code>MellonSPCertFile</code>
directives at your own key and cert files and then downloading the SP
metadata as described in <a href="#using_mellon_to_create_metadata">Using Mellon to generate its own metadata</a>.</p>
</div>
</div>
<div class="sect3">
<h4 id="sign_metadata">5.6.4. Signing metadata</h4>
<div class="paragraph">
<p>SAML requires provider metadata to be integrity protected. Publishing
provider metadata over a secure TLS channel goes a long way to
accomplishing this goal and may be considered sufficient depending on
the security requirements. SAML metadata can be integrity protected by
signing the metadata with an XML signature. Some providers may require
any metadata they consume be signed. Unfortunately neither Mellon nor
any of the tools currently associated with Mellon have support for
signing Mellon metadata. Fortunately there are a variety of tools
available to sign an XML document and since SAML metadata is a normal
XML document any of these tools can be used to sign the Mellon
metadata.</p>
</div>
<div class="sect4">
<h5 id="xmlsec_metadata_signing">Using xmlsec to sign metadata</h5>
<div class="paragraph">
<p>The <code>xmlsec</code> tools are commonly available on most Linux based
system. In fact the <code>Lasso</code> library which supplies Mellon with its
SAML implementation uses the <code>xmlsec</code> library to perform all of its
XML signing and signature verification. <code>xmlsec</code> usually ships with an
<code>xmlsec</code> command line utility, which can perform XML signing
and verification from the command line.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<code>xmlsec</code> may be packaged under the name <code>xmlsec1</code> in your
distribution. This is the case for all Red Hat distributions.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>To sign Mellon metadata using <code>xmlsec</code> you need to add a signature
template to the Mellon metadata. When <code>xmlsec</code> reads the input
metadata it locates the empty signature template and replaces it with
a processed signature. The signature template should be placed near
the top of the metadata, ideally just after the <code>&lt;EntityDescriptor&gt;</code>
element. Here is an example of a signature template:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-xml" data-lang="xml">&lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;SignedInfo&gt;
&lt;CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n"/&gt;
&lt;SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/&gt;
&lt;Reference URI=""&gt;
&lt;Transforms&gt;
&lt;Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /&gt;
&lt;/Transforms&gt;
&lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;DigestValue&gt;&lt;/DigestValue&gt;
&lt;/Reference&gt;
&lt;/SignedInfo&gt;
&lt;SignatureValue /&gt;
&lt;KeyInfo&gt;
&lt;KeyValue /&gt;
&lt;/KeyInfo&gt;
&lt;/Signature&gt;</code></pre>
</div>
</div>
<div class="paragraph">
<p>Because the <code>&lt;Reference&gt; URI</code> attribute is the empty string the entire
document will be signed. In order for <code>xmlsec</code> to generate a signature
you will need to supply it with both the private and public key parts.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>xmlsec \\ <i class="conum" data-value="1"></i><b>(1)</b>
--sign \\ <i class="conum" data-value="2"></i><b>(2)</b>
--privkey-pem demo.key \\ <i class="conum" data-value="3"></i><b>(3)</b>
--pubkey-cert-pem demo.cert \\ <i class="conum" data-value="4"></i><b>(4)</b>
--output signed_metadata.xml \\ <i class="conum" data-value="5"></i><b>(5)</b>
metadata.xml <i class="conum" data-value="6"></i><b>(6)</b></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td><code>xmlsec</code> command may be named <code>xmlsec1</code> on your system</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td>Perform signing</td>
</tr>
<tr>
<td><i class="conum" data-value="3"></i><b>3</b></td>
<td>Private key used for signing</td>
</tr>
<tr>
<td><i class="conum" data-value="4"></i><b>4</b></td>
<td>Public key used to verify signature (included in signature)</td>
</tr>
<tr>
<td><i class="conum" data-value="5"></i><b>5</b></td>
<td>Output file containing signed metadata</td>
</tr>
<tr>
<td><i class="conum" data-value="6"></i><b>6</b></td>
<td>Input unsigned metadata (with signature template)</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>To verify the signature on the command line:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>xmlsec \\ <i class="conum" data-value="1"></i><b>(1)</b>
--verify \\ <i class="conum" data-value="2"></i><b>(2)</b>
signed_metadata.xml <i class="conum" data-value="3"></i><b>(3)</b></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td><code>xmlsec</code> command may be named <code>xmlsec1</code> on your system</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td>Perform verification</td>
</tr>
<tr>
<td><i class="conum" data-value="3"></i><b>3</b></td>
<td>Input signed metadata</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="mellon_endpoint_path">5.7. MellonEndpointPath</h3>
<div class="paragraph">
<p>Mellon reserves a number of URLs for its use. Some of these
URLs are the public SAML <a href="#endpoints">endpoints</a> advertised in the
<a href="#sp_metadata">SP metadata</a>. Others are for Mellon&#8217;s private use.
The best way to think of these Mellon endpoints is as a way of binding a
URL to a handler. When an HTTP request arrives at one of these Mellon
endpoints a dedicated handler processes the request.</p>
</div>
<div class="paragraph">
<p>The way Mellon identifies a URL as being one of its endpoints is by
looking at the beginning of the URL path. If everything in the path
except the last path component matches the <code>MellonEndpointPath</code> then
Mellon recognizes the URL as being one of its endpoints. The last
path component is used to bind to the handler.</p>
</div>
<div class="paragraph">
<p>Let&#8217;s use an example. If the <code>MellonEndpointPath</code> is <code>/foo/bar</code> then
any URL with the form <code>/foo/bar/xxx</code> will be handled by Mellon&#8217;s xxx
handler.</p>
</div>
<div class="paragraph">
<p>Mellon enforces 2 strict requirements on the <code>MellonEndpointPath</code>:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The path <strong>must</strong> be an absolute path from the root of the web server.</p>
</li>
<li>
<p>The path <strong>must</strong> be a sub-path of the Mellon <code>&lt;Location&gt;</code>
directive that defines it. The reason for this is simple. Mellon
ignores locations which are not configured for Mellon. Therefore for
Mellon to respond to a request on one of its SAML endpoints, the
endpoint has to be inside a path that Mellon is watching.</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="mellon_endpoints">5.8. Mellon Endpoints</h3>
<div class="paragraph">
<p>Mellon endpoints are hung off of the <a href="#mellon_endpoint_path">MellonEndpointPath</a>.
Mellon reserves a number of URLs for its use. Some of these
URLs are the public SAML <a href="#endpoints">endpoints</a> advertised in the
<a href="#sp_metadata">SP metadata</a>. Others are for Mellon&#8217;s private use.
The best way to think of these Mellon endpoints is a way of binding a
URL to a handler. When an HTTP request arrives at one of these Mellon
endpoints a dedicated handler processes the request.</p>
</div>
<div class="paragraph">
<p>The current list of Mellon endpoints (handlers) is:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">postResponse</dt>
<dd>
<p>The <em>AssertionConsumerService</em> endpoint using the SAML HTTP-POST
binding.</p>
</dd>
<dt class="hdlist1">artifactResponse</dt>
<dd>
<p>The <em>AssertionConsumerService</em> endpoint for SAML artifacts. SAML artifacts
provide an indirect method to convey data. An artifact is an
identifier that points to data. Requesting data using the artifact
identifier returns the associated data.</p>
</dd>
<dt class="hdlist1">paosResponse</dt>
<dd>
<p>The AssertionConsumerService endpoint using the SAML PAOS
binding.</p>
</dd>
<dt class="hdlist1">login</dt>
<dd>
<p>Mellon internal endpoint used to start the authentication process with
an IdP. Any request whose URL needs authentication is redirected here
to start the login process.</p>
</dd>
<dt class="hdlist1">logout</dt>
<dd>
<p>The SingleLogoutService SAML endpoint.</p>
</dd>
<dt class="hdlist1">metadata</dt>
<dd>
<p>A HTTP GET request on this endpoint will return the SP&#8217;s metadata.</p>
</dd>
<dt class="hdlist1">repost</dt>
<dd>
<p>Mellon internal endpoint which replays POST data from the original
request.</p>
</dd>
<dt class="hdlist1">auth</dt>
<dd>
<p>Mellon internal endpoint retained for backwards compatibility.</p>
</dd>
<dt class="hdlist1">probeDisco</dt>
<dd>
<p>IdP probe discovery service endpoint. See "Probe IdP discover" in the
Mellon README for more information.</p>
</dd>
</dl>
</div>
</div>
<div class="sect2">
<h3 id="mellon_session">5.9. Mellon Session</h3>
<div class="paragraph">
<p>SAML sessions are described in <a href="#saml_sessions">Sessions</a>.</p>
</div>
<div class="paragraph">
<p>For each successfully authenticated user Mellon maintains a
session. Mellon allocates a unique ID for the session when it is
created. The Mellon session ID is sent to the user&#8217;s browser in a
<a href="#mellon_cookie">Mellon Cookie</a>. The <a href="#mellon_cookie">Mellon Cookie</a> is sent back to Mellon in
every request the browser makes to the SP. Mellon uses the session ID
to look-up the session data for the user. Internally Mellon calls
session data <em>cache data</em> (this is subject to change).</p>
</div>
<div class="paragraph">
<p>At the time of this writing Mellon session data is local to one Apache
server (which may have multiple worker processes sharing data in
shared memory). This has consequences for High Availability (e.g. HA)
deployments which may be running multiple Apache servers on different
nodes behind a load balancer, see <a href="#load_balancer_persistence">Load balancer proxy persistence</a> for
detailed information on this issue.</p>
</div>
<div class="paragraph">
<p>Mellon limits the duration of a valid session by the length of time
defined in the <code>MellonSessionLength</code> directive. Currently the default
is 86400 seconds which is 24 hours.</p>
</div>
<div class="paragraph">
<p>The IdP can inform the SP how long it wishes a SP session to be valid
by passing the <code>SessionNotOnOrAfter</code> attribute in a
<code>&lt;AuthnStatement&gt;</code>. Mellon respects the <code>SessionNotOnOrAfter</code>
attribute and will limit its session duration based on it. Thus the
validity period for a Mellon session is the lesser of the
<code>MellonSessionLength</code> or the optional IdP <code>SessionNotOnOrAfter</code>
attribute if the IdP supplied it.</p>
</div>
</div>
<div class="sect2">
<h3 id="mellon_cookie">5.10. Mellon Cookie</h3>
<div class="paragraph">
<p><a href="#mellon_session">Mellon Session</a> information is communicated via a cookie. The
cookie name defaults to <code>mellon-cookie</code> but may be changed via the
Mellon directive <code>MellonVariable</code>. Mellon always forms the cookie name
by appending the value of <code>MellonVariable</code> to the string <code>mellon-</code> to
prevent name collisions. Thus the actual default value of
<code>MellonVariable</code> is <code>cookie</code>.</p>
</div>
<div class="paragraph">
<p>When Mellon first begins the authentication process it sets the mellon
cookie value to <code>cookietest</code>. The primary purpose of the <code>cookietest</code>
value is to confirm cookies are properly returned by the browser,
Mellon will not work correctly unless cookies are enabled. The
<code>cookietest</code> value also serves as a temporary value
indicating an authentication flow is in progress but has not yet
completed.</p>
</div>
<div class="paragraph">
<p>After Mellon successfully authenticates a user it establishes a
session for the user and generates a unique session ID which it sets
as the value of the Mellon cookie. When Mellon receives a request for
a protected resource it looks for the Mellon cookie in the HTTP
request headers. Mellon then uses the Mellon cookie value as a session
ID and attempts to look-up that session using that ID. If the session
is found and it remains valid, Mellon immediately grants access. A
Mellon session will expire, see <a href="#mellon_session">Mellon Session</a> for information
concerning session lifetime.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_working_with_saml_attributes_and_exporting_values_to_web_apps">6. Working with SAML attributes and exporting values to web apps</h2>
<div class="sectionbody">
<div class="paragraph">
<p>When you receive a SAML assertion authenticating a subject, the
assertion will likely include additional attributes provided by the
IdP concerning the subject. Examples include the user&#8217;s email address
or the groups they are a member of. You may wish to review the
<a href="#assertion_response">assertion example</a> and look for
<code>&lt;saml:Attribute&gt;</code> and <code>&lt;saml:AttributeValue&gt;</code> elements to see how the
IdP communicates these attributes. There is no fixed set of attributes
returned by an IdP, it is entirely IdP dependent. You will either have
to review your IdP&#8217;s documentation or examine a returned assertion to
determine the possible attributes. See <a href="#inspect_saml_messages">Inspect SAML messages</a> for the
various ways you can examine the contents of a returned assertion.</p>
</div>
<div class="paragraph">
<p>Mellon communicates its results via Apache environment variables. For
every attribute received in the assertion Mellon will insert an Apache
environment variable. You have some flexibility on how Mellon adds
these environment variables which derive from the assertion
attributes.</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Attributes can be multi-valued. <code>MellonMergeEnvVars</code> controls
whether each value is added to the environment by appending an index
to the attribute name or whether the values are listed together
under the bare attribute name with each value separated by a
separator character. See <a href="#multiple_attribute_values">Handling multiple attribute values</a>.</p>
</li>
<li>
<p>Attribute names can be mapped from the name as it appears in the
assertion to a name of your choosing when it is placed in the Apache
environment. This is controlled by <code>MellonSetEnv</code> and
<code>MellonSetEnvNoPrefix</code> directives. The distinction
is <code>MellonSetEnv</code> always prepends the <code>MELLON_</code> prefix to the
environment variable name to help to prevent name collisions. The
<code>MellonSetEnvNoPrefix</code> directive also remaps the assertion name to a
name of your choosing but it omits prepending the environment
variable name with <code>MELLON_</code>. See <a href="#map_assertion_attr_name">Map assertion attribute name to different Apache environment variable name</a></p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Using the <a href="#assertion_response">assertion example</a> Mellon places these
environment variables in the Apache environment. See
<a href="#multiple_attribute_values">Handling multiple attribute values</a> for an explanation of
<code>MellonMergeEnvVars</code> and its effect.</p>
</div>
<div class="listingblock">
<div class="title">MellonMergeEnvVars Off</div>
<div class="content">
<pre>MELLON_NAME_ID: G-803528aa-2f9e-454b-a89c-55ee74e75d1e
MELLON_NAME_ID_0: G-803528aa-2f9e-454b-a89c-55ee74e75d1e
MELLON_groups: ipausers
MELLON_groups_0: ipausers
MELLON_groups_1: openstack-users
MELLON_email: jdoe@music.com
MELLON_email_0: jdoe@music.com
MELLON_display_name: John Doe
MELLON_display_name_0: John Doe
MELLON_initials: JD
MELLON_initials_0: JD
MELLON_last_name: Doe
MELLON_last_name_0: Doe
MELLON_first_name: John
MELLON_first_name_0: John
MELLON_Role: uma_authorization
MELLON_Role_0: uma_authorization
MELLON_Role_1: manage-account
MELLON_Role_2: view-profile
MELLON_IDP: https://rhsso.example.com:8443/auth/realms/test
MELLON_IDP_0: https://rhsso.example.com:8443/auth/realms/test</pre>
</div>
</div>
<div class="sect2">
<h3 id="multiple_attribute_values">6.1. Handling multiple attribute values</h3>
<div class="paragraph">
<p>If an attribute has multiple values, then they will be stored as</p>
</div>
<div class="listingblock">
<div class="content">
<pre>MELLON_&lt;name&gt;_0 value0
MELLON_&lt;name&gt;_1 value1
MELLON_&lt;name&gt;_2 value2
...</pre>
</div>
</div>
<div class="paragraph">
<p>Since Mellon doesn&#8217;t know which attributes may have multiple values,
it will store each attribute at least twice. For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>MELLON_&lt;name&gt; value0
MELLON_&lt;name&gt;_0 value0</pre>
</div>
</div>
<div class="paragraph">
<p>In the case of multivalued attributes <code>MELLON_&lt;name&gt;</code> will contain the
first value.</p>
</div>
<div class="paragraph">
<p>If <code>MellonMergeEnvVars</code> is enabled multiple values of attributes will
be stored in a single environment variable separated by the
<code>MellonMergeEnvVars</code> separator which defaults to the semicolon. You
can override the default separator by supplying it as the second
option to the <code>MellonMergeEnvVars</code> directive.</p>
</div>
<div class="paragraph">
<p>Thus the above environment variable list would be this if
<code>MellonMergeEnvVars</code> was on and the separator was set to the semicolon.</p>
</div>
<div class="listingblock">
<div class="title">MellonMergeEnvVars On ;</div>
<div class="content">
<pre>MELLON_NAME_ID: G-803528aa-2f9e-454b-a89c-55ee74e75d1e
MELLON_groups: ipausers;openstack-users
MELLON_email: jdoe@music.com
MELLON_display_name: John Doe
MELLON_initials: JD
MELLON_last_name: Doe
MELLON_first_name: John
MELLON_Role: uma_authorization;manage-account;view-profile
MELLON_IDP: https://rhsso.example.com:8443/auth/realms/test</pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="map_assertion_attr_name">6.2. Map assertion attribute name to different Apache environment variable name</h3>
<div class="paragraph">
<p>Sometimes the web app is expecting a specific name for a SAML
attribute but your IdP has sent that attribute under a different
name. You can rename any assertion attribute using the <code>MellonSetEnv</code>
and <code>MellonSetEnvNoPrefix</code> directives. These allow you to rename an
assertion attribute to a name of your choosing. The <code>MellonSetEnv</code>
directive follows the same convention as all other assertion
attributes added by Mellon in that it always prefixes the environment
variable name with <code>MELLON_</code> to help avoid name collisions in the
Apache environment. However sometimes you do not want the <code>MELLON_</code>
prefix added and instead you want to use exactly the environment
variable name as specified., <code>MellonSetEnvNoPrefix</code> serves this role.</p>
</div>
<div class="paragraph">
<p>To illustrate let&#8217;s look at an example. Suppose your web app is
expecting an attribute which is the user&#8217;s last name, specifically it
wants this attribute to be called <code>REMOTE_USER_LASTNAME</code>. However your
IdP sends this attribute as <code>sn</code>. <code>sn</code> is typically used in LDAP
directories as an attribute name for surname, or equivalently the
user&#8217;s last name. To map the <code>sn</code> assertion attribute name to the
Apache environment variable name of <code>REMOTE_USER_LASTNAME</code> you would
do this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>MellonSetEnvNoPrefix REMOTE_USER_LASTNAME sn</pre>
</div>
</div>
<div class="paragraph">
<p>Also see <a href="#set_remote_user">How to set REMOTE_USER</a> for an example of setting the <code>REMOTE_USER</code>
environment variable using <code>MellonSetEnvNoPrefix</code>.</p>
</div>
</div>
<div class="sect2">
<h3 id="assertion_constraints">6.3. Using Mellon to apply constraints</h3>
<div class="paragraph">
<p>SAML attributes can be used for more than exporting those values to a
web app. You can also utilize SAML attributes to control whether
Mellon authentication succeeds (a form of authorization). So even
though the IdP may have successfully authenticated the user you can
apply additional constraints via the <code>MellonCond</code> directive. The basic
idea is that each <code>MellonCond</code> directive specifies one condition that
either evaluates to <code>True</code> or <code>False</code>. Multiple conditions can be
joined by logical operators. You can also specify case insensitive
matching, substring matching, regular expression matching, substitute
values, and use regular expression back references. All <code>MellonCond</code>
conditions must evaluate to <code>True</code> for the condition check to succeed
(logical conjunction) unless you use the <code>OR</code> option flag.</p>
</div>
<div class="paragraph">
<p>The directive is specified as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>MellonCond attr_name value [options]</pre>
</div>
</div>
<div class="paragraph">
<p>The 1st <code>attr_name</code> parameter is the name of the SAML assertion
attribute the condition applies to. If an attribute with this name is
found, its value is retrieved and becomes the data the condition is
evaluated against. If <code>attr_name</code> is not found, the condition evaluates
to <code>False</code>.</p>
</div>
<div class="paragraph">
<p>The 2nd value parameter is the value applied to the attribute
value. For example when matching is performed the <code>value</code> parameter is
searched for inside the attribute&#8217;s value.</p>
</div>
<div class="paragraph">
<p>The <code>value</code> parameter may contain format specifiers which are
substituted prior to performing an operation on the value. Format
specifiers always begin with the <code>%</code> character. Here are the valid
format specifiers:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">%n</dt>
<dd>
<p>Regular expression backreference. Regular expressions may
contain multiple sub-matches (often referred to as a regular
expression group). To refer to a specific sub-match in the regular
expression pattern use a digit between 0 and 9 as <code>%n</code>. This only
works if a prior condition had specified the [<code>REG,REF]</code> flags,
otherwise there would be no backreference to refer to.</p>
</dd>
<dt class="hdlist1">%{num}</dt>
<dd>
<p>Same as <code>%n</code>, but permits a number greater than 9.</p>
</dd>
<dt class="hdlist1">%\{ENV:x}</dt>
<dd>
<p>Substitute the Apache environment variable <code>x</code>. If the
environment variable does not exist substitute the empty string
instead.</p>
</dd>
<dt class="hdlist1">%%</dt>
<dd>
<p>Quote a <code>%</code> to prevent it from being interpreted as a the
beginning of a format specifier.</p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>The 3rd <code>[options]</code> parameter is optional and if specified is a comma
separated list of option flags enclosed in square brackets. The set of
option flags includes:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">OR</dt>
<dd>
<p>If this MellonCond evaluated to false, then the next one will be
checked. If it evaluates to true, then the overall check succeeds.</p>
</dd>
<dt class="hdlist1">NOT</dt>
<dd>
<p>Invert the result of the condition check. If the condition
evaluated to <code>True</code> it becomes <code>False</code>, likewise if the condition
evaluated to <code>False</code> it become <code>True</code>.</p>
</dd>
<dt class="hdlist1">NC</dt>
<dd>
<p>Case insensitive matching. Ignore case differences when
performing any match operation.</p>
</dd>
<dt class="hdlist1">SUB</dt>
<dd>
<p>Substring match. If value is included anywhere in the attribute
value as a substring the condition evaluates to <code>True</code>, otherwise
<code>False</code>. If <code>SUB</code> is not specified then the condition value and
attribute value must match in its entirety.</p>
</dd>
<dt class="hdlist1">REG</dt>
<dd>
<p>Regular expression match. The value is interpreted as a regular
expression. If the regular expression is found in the attribute value
the condition evaluates to <code>True</code>, <code>False</code> otherwise.</p>
</dd>
<dt class="hdlist1">REF</dt>
<dd>
<p>Used with REG, track regular expression back references,
So that they can be substituted in an upcoming
<code>MellonCond</code> directive.</p>
</dd>
<dt class="hdlist1">MAP</dt>
<dd>
<p>Use mapped name. Instead of looking up the attribute name in the
set of attributes returned in the assertion use the mapped name
specified by either <code>MellonSetEnv</code> or <code>MellonSetEnvNoPrefix</code> instead.
If the mapped name is not found then fallback to using the name in the
assertion&#8217;s set of attributes.</p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>Here is a simple example illustrating how one might utilize
<code>MellonCond</code>. Suppose we only want to allow members of the group
<code>openstack-users</code> to have access. Our IdP has provided us with the
list of groups the user is a member of in the <code>groups</code> SAML
attribute. We need to instruct Mellon to only accept an assertion if
<code>openstack-users</code> appears as one of the <code>groups</code> attribute
values. This can be accomplished like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>MellonCond groups openstack-users</pre>
</div>
</div>
<div class="paragraph">
<p>If <code>openstack-users</code> does not appear in the as one of the <code>groups</code>
attribute values the check will fail. The check will also fail if the
<code>groups</code> attribute is not defined in the assertion.</p>
</div>
</div>
<div class="sect2">
<h3 id="set_remote_user">6.4. How to set REMOTE_USER</h3>
<div class="paragraph">
<p>Mellon stores the authenticated user&#8217;s name in the attribute <code>NAME_ID</code>
(see <a href="#name_id">Username, userid, SAML NameID</a>). If you want to export the username as
<code>REMOTE_USER</code> so your web app can process this very common CGI
variable this can easily be accomplished with <code>MellonSetEnvNoPrefix</code>
like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>MellonSetEnvNoPrefix REMOTE_USER NAME_ID</pre>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="deployment_considerations">7. Deployment Considerations</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="apache_servername">7.1. Apache Servername</h3>
<div class="paragraph">
<p>When Mellon is running behind a load balancer, SSL terminator, or in a
Apache virtual host there is the opportunity for Mellon to identify
itself incorrectly. If Mellon does not identify itself identically to
what appears in the matching metadata, various SAML security checks
will fail as well as the ability to communicate on the defined
<a href="#endpoints">SAML Endpoints</a>.</p>
</div>
<div class="paragraph">
<p>At run time Mellon asks Apache what scheme, host and port it&#8217;s running
under. Mellon uses this information to build URLs. When Mellon is
running in a simple configuration directly connected to the internet,
Apache typically gets this information correctly from the
environment. However when Apache is behind some type of proxy such as
a load balancer, then there is a distinction between what clients see
as the front end and what Mellon sees when it&#8217;s running as a backend
server. The trick is to make Mellon believe it&#8217;s running as the front
end so that it matches the client&#8217;s view. You may wish to refer to
<a href="#load_balancer">Load Balancer Issues</a> for more information.</p>
</div>
<div class="paragraph">
<p>Load balancers partition their view between front end and back end.</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">front end</dt>
<dd>
<p>What the client connects to. It&#8217;s the public scheme,
hostname, and port.</p>
</dd>
<dt class="hdlist1">back end</dt>
<dd>
<p>The back end server is where Mellon runs. It will
definitely have a different hostname than the front end and will
likely also have a different scheme and port as well.</p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>When a HTTP request arrives at the front end most load balancers will
terminate the SSL connection. This changes the scheme from <code>https</code> to
<code>http</code>. The load balancer will select a backend server to forward the
request to. The backend server will have a different hostname and
possibly a different port. Mellon needs to see the HTTP request as it
appeared on the front end instead of how the request appears to the
backend server where Mellon is running.</p>
</div>
<div class="paragraph">
<p>The host and port appear in several contexts:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The host and port in the URL the client used.</p>
</li>
<li>
<p>The host HTTP header inserted into the HTTP request (derived from
the client URL host).</p>
</li>
<li>
<p>The hostname of the front facing proxy the client connects to
(actually the FQDN of the IP address the proxy is listening on).</p>
</li>
<li>
<p>The host and port of the backend server which actually handled the client
request.</p>
</li>
<li>
<p>The <strong>virtual</strong> host and port of the server that actually handled the client
request.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>It is vital to understand how each of these is utilized, otherwise
there is the opportunity for the wrong host and port to be used with
the consequence the authentication protocols may fail because they
cannot validate who the parties in the transaction are and whether the
data is carried in a secure transport.</p>
</div>
<div class="paragraph">
<p>Let&#8217;s begin with the backend server handling the request, because this
is where the host and port are evaluated and most of the problems
occur. The backend server needs to know:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The URL of the request (including host &amp; port)</p>
</li>
<li>
<p>Its own host &amp; port</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Apache supports virtual name hosting. This allows a single server to
host multiple domains. For example a server running on example.com
might service requests for both bigcorp.com and littleguy.com. The
latter 2 names are virtual host names. Virtual hosts in Apache
are configured inside a server configuration block, for example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>&lt;VirtualHost&gt;
ServerName bigcorp.com
&lt;/VirtualHost&gt;</pre>
</div>
</div>
<div class="paragraph">
<p>When Apache receives a request it deduces the host from the <code>HOST</code>
HTTP header. It then tries to match the host to the <code>ServerName</code> in
its collection of virtual hosts.</p>
</div>
<div class="paragraph">
<p>The Apache <code>ServerName</code> directive sets the request scheme, hostname
and port that the server uses to identify itself. The behavior of the
<code>ServerName</code> directive is modified by the Apache <code>UseCanonicalName</code>
directive. When <code>UseCanonicalName</code> is enabled Apache will use the
hostname and port specified in the <code>ServerName</code> directive to construct
the canonical name for the server. This name is used in all
self-referential URLs, and for the values of SERVER_NAME and
SERVER_PORT in CGIs. If <code>UseCanonicalName</code> is <code>Off</code>, Apache will form
self-referential URLs using the hostname and port supplied by the
client, if any are supplied.</p>
</div>
<div class="paragraph">
<p>If no port is specified in the <code>ServerName</code>, then the server will use
the port from the incoming request. For optimal reliability and
predictability, you should specify an explicit hostname and port using
the <code>ServerName</code> directive. If no <code>ServerName</code> is specified, the
server attempts to deduce the host by first asking the operating
system for the system hostname, and if that fails, performs a reverse
lookup on an IP address present on the system. Obviously this will
produce the wrong host information when the server is behind a proxy
because the backend server is not what is seen on the frontend
by clients; therefore use of the <code>ServerName</code> directive is essential.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<a id="standard_port_issue"></a> Browsers will strip standard port 80 for
HTTP and port 443 for HTTPS from the network location in a URL. For
example if you specify a URL like this
<code><a href="https://example.com:443/some/path" class="bare">https://example.com:443/some/path</a></code> the URL which will placed on the
wire will be <code><a href="https://example.com/some/path" class="bare">https://example.com/some/path</a></code> without the standard
port. Since Mellon and most SAML providers validate URLs by simple
string comparison, including a standard port in a URL will cause URL
matching to fail because one URL will have the port in it and the
other URL won&#8217;t.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>The Apache
<a href="https://httpd.apache.org/docs/current/mod/core.html#servername&gt;">ServerName</a>
doc is very clear concerning the need to fully specify the scheme,
host, and port in the <code>Server</code> name directive when the server is
behind a proxy. It states:</p>
</div>
<div class="quoteblock">
<blockquote>
<div class="paragraph">
<p>Sometimes, the server runs behind a device that processes SSL,
such as a reverse proxy, load balancer or SSL offload
appliance. When this is the case, specify the https:// scheme and
the port number to which the clients connect in the ServerName
directive to make sure that the server generates the correct
self-referential URLs.</p>
</div>
</blockquote>
</div>
</div>
<div class="sect2">
<h3 id="load_balancer">7.2. Load Balancer Issues</h3>
<div class="paragraph">
<p>High Availability (HA) deployments often run their services behind a
load balancer. By far the most popular load balancer is
<a href="http://www.haproxy.com/">HAProxy</a>. As a consequence we will use HAProxy
examples in this document. Other load balancers behave in a similar
fashion to HAProxy and you can extrapolate the HAProxy information to
them.</p>
</div>
<div class="sect3">
<h4 id="_server_name">7.2.1. Server Name</h4>
<div class="paragraph">
<p>Because backend servers do not self-identify with the same front end
public address, it is vital you force those Apache servers to identify
with the public address. This issue is described in
<a href="#apache_servername">Apache Servername</a>. The reason for this is because the SAML
protocols require URLs to match what is in a SAML provider&#8217;s
metadata. If you allow a backend server to self-identify, the URLs
exchanged in the protocols will not match and you will encounter an
error; see <a href="#invalid_destination">HTTP_BAD_REQUEST - Invalid Destination on Response</a>.</p>
</div>
</div>
<div class="sect3">
<h4 id="load_balancer_persistence">7.2.2. Load balancer proxy persistence</h4>
<div class="paragraph">
<p>In an HA deployment, multiple backend servers run on distinct nodes and
cooperate to mitigate the load that might be placed on a single
(front end) server. Because the backend servers are independent, they
do not share state with any other backend server unless something has
explicitly been done to share state. HTTP is technically a stateless
protocol, which makes web traffic ideally suited for a HA deployment:
each backend server can be ignorant of any other HTTP request. However
in practice HTTP is stateful by virtue of cookies. Authentication
protocols are good examples of HTTP transactions that require saved
state, in particular <a href="#mellon_session">Mellon sessions</a>.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
At the time of this writing Mellon has no support for sharing session
data between independent Apache servers. The consequence of this is
Mellon will not work correctly unless the same Apache server
consistently handles a users HTTP traffic.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>HAProxy has two different mechanisms to bind HTTP traffic to one
server, <em>affinity</em> and <em>persistence</em>. This article provides an
excellent overview of the distinction between the two and how to
implement it: <a href="http://www.haproxy.com/blog/load-balancing-affinity-persistence-sticky-sessions-what-you-need-to-know/">"load balancing, affinity, persistence, sticky sessions: what you need to know"</a>.</p>
</div>
<div class="paragraph">
<p>What is the difference between Persistence and Affinity? Affinity is
when information from a layer below the application layer is used to
pin a client request to a single server. Persistence is when
application layer information binds a client to a single server sticky
session. The main advantage of persistence over affinity is
it is much more accurate.</p>
</div>
<div class="paragraph">
<p>Persistence is implemented though the use of cookies. The HAProxy
<code>cookie</code> directive names the cookie which will be used for
persistence, along with parameters controlling its use. The HAProxy
<code>server</code> directive has a <code>cookie</code> option that sets the value of
the cookie: it should be set to the name of the server. If an incoming
request does not have a cookie identifying the backend server, then
HAProxy selects a server based on its configured balancing
algorithm. HAProxy assures that the cookie is set to the name of the
selected server in the response. If the incoming request has a cookie
identifying a backend server, then HAProxy automatically selects that
server to handle the request.</p>
</div>
<div class="paragraph">
<p>To enable persistence in the backend server block of the
<code>/etc/haproxy/haproxy.cfg</code> configuration this line must be added:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>cookie SERVERID insert indirect nocache</pre>
</div>
</div>
<div class="paragraph">
<p>This says <code>SERVERID</code> will be the name of our HAProxy persistence
cookie. Then we must edit each <code>server</code> line and add <code>cookie
&lt;server-name&gt;</code> as an additional option. For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>server server-0 cookie server-0
server server-1 cookie server-1</pre>
</div>
</div>
<div class="paragraph">
<p>Note, the other parts of the server directive have been omitted for
clarity.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
The <a href="#mellon_cookie">Mellon session cookie</a> and the HAProxy
server persistence cookie are entirely separate. Do not confuse
them. The HAProxy server persistence cookie identifies the backend
server which issued the Mellon cookie.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>For Mellon to work correctly, all user requests <strong>must</strong> be handled by
the same backend server that issued the Mellon cookie in the first place.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="forwarded_http_headers">7.3. Forwarded HTTP Headers</h3>
<div class="paragraph">
<p>When proxies are in effect the <code>X-Forwarded-\*</code> HTTP headers come
into play. These are set by proxies and are meant to allow an entity
processing a request to recognize that the request was forwarded and
what the original values were <em>before</em> being forwarded.</p>
</div>
<div class="paragraph">
<p>A common HAProxy configuration sets the <code>X-Forwarded-Proto</code> HTTP
header based on whether the front connection utilized SSL/TLS or not
via this configuration::</p>
</div>
<div class="literalblock">
<div class="content">
<pre>http-request set-header X-Forwarded-Proto https if { ssl_fc }
http-request set-header X-Forwarded-Proto http if !{ ssl_fc }</pre>
</div>
</div>
<div class="paragraph">
<p>To make matters interesting, core Apache <strong>does not</strong> interpret this
header; thus responsibility falls to someone else to process it. In the
situation where HAProxy terminates SSL prior to the backend server
processing the request, the fact that the <code>X-Forwarded-Proto</code> HTTP header
is set to https is <strong>irrelevant</strong> because Apache does not utilize the
header when an extension module such as Mellon asks for the protocol
scheme of the request. This is why it is <strong>essential</strong> to have the
<code>ServerName</code> directive include the <code>scheme:://host:port</code> and to have
<code>UseCanonicalName</code> enabled: otherwise Apache extension modules such
as Mellon will not function properly behind a proxy.</p>
</div>
<div class="paragraph">
<p>But what about web apps hosted by Apache behind a proxy? It turns out
it&#8217;s the web app&#8217;s (or rather the web app framework&#8217;s) responsibility to
process the forwarded header. Thus apps handle the protocol scheme of
a forwarded request differently than Apache extension modules do.</p>
</div>
<div class="paragraph">
<p>The critical thing to note is is that Apache extension modules and web
apps process the request scheme of a forwarded request differently,
demanding that <strong>both</strong> the <code>ServerName</code> and <code>X-Forwarded-Proto</code> HTTP
header techniques be utilized.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="error_response">8. When a SAML party responds with an error</h2>
<div class="sectionbody">
<div class="paragraph">
<p>SAML is a request/response protocol much like HTTP. In fact the two
major SAML datatypes are <code>Request</code> and <code>Response</code>. A <code>Response</code>
contains a <code>Status</code> element which includes a <code>StatusCode</code> indicating
if the <code>Request</code> succeeded or failed, and if it failed, the reason
why. The <code>StatusCode</code> element may contain additional nested
<code>StatusCode</code> elements providing additional details, but typically
there is usually only one or two <code>StatusCode</code> elements. The outermost
<code>StatusCode</code> is called the top-level status code, the next nested
<code>StatusCode</code> is called the second-level status code. <code>StatusCode</code>
values <strong>must</strong> be a URI. The top-level status codes <strong>must</strong> be one of
one of the top-level status codes defined by the SAML specification. The
second-level status code must also be a URI and should be one of the
second-level status codes defined by SAML but a system entity may
define its own non-top-level status codes.</p>
</div>
<div class="paragraph">
<p>In addition to the <code>StatusCode</code> elements a <code>Status</code> element may also
contain an optional <code>StatusMessage</code> with greater detail and/or a
<code>StatusDetail</code> whose format is not defined by SAML.</p>
</div>
<div class="paragraph">
<p>In most scenarios Mellon, acting as a relying party, issues a
<code>Request</code> to an IdP acting as an asserting party, which then replies
with a <code>Response</code> containing a <code>Status</code>. Occasionally Mellon will
receive a <code>Request</code> from an IdP for which Mellon will respond with a
<code>Response</code> and <code>Status</code>; a good example of this is IdP-initiated
logout.</p>
</div>
<div class="paragraph">
<p><strong>When diagnosing problems you should examine the <code>StatusCode</code> values
and any additional information in the <code>Status</code> element.</strong></p>
</div>
<div class="sect2">
<h3 id="_top_level_status_codes">8.1. Top-level status codes</h3>
<div class="paragraph">
<p>Below are top-level status codes as defined by SAML.</p>
</div>
<div class="dlist">
<div class="title">Top-level status codes</div>
<dl>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:Success</dt>
<dd>
<p>The request succeeded. Additional information MAY be returned in the
&lt;StatusMessage&gt; and/or &lt;StatusDetail&gt; elements.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:Requester</dt>
<dd>
<p>The request could not be performed due to an error on the part of the
requester.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:Responder</dt>
<dd>
<p>The request could not be performed due to an error on the part of the
SAML responder or SAML authority.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:VersionMismatch</dt>
<dd>
<p>The SAML responder could not process the request because the version
of the request message was incorrect.</p>
</dd>
</dl>
</div>
</div>
<div class="sect2">
<h3 id="_second_level_status_codes">8.2. Second-level status codes</h3>
<div class="paragraph">
<p>Below are second-level status codes as defined by SAML.</p>
</div>
<div class="dlist">
<div class="title">Second-level status codes</div>
<dl>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:AuthnFailed</dt>
<dd>
<p>The responding provider was unable to successfully authenticate the
principal.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue</dt>
<dd>
<p>Unexpected or invalid content was encountered within a
&lt;saml:Attribute&gt; or &lt;saml:AttributeValue&gt; element.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy</dt>
<dd>
<p>The responding provider cannot or will not support the requested name
identifier policy.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext</dt>
<dd>
<p>The specified authentication context requirements cannot be met by the
responder.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP</dt>
<dd>
<p>Used by an intermediary to indicate that none of the supported
identity provider &lt;Loc&gt; elements in an &lt;IDPList&gt; can be resolved or
that none of the supported identity providers are available.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:NoPassive</dt>
<dd>
<p>Indicates the responding provider cannot authenticate the principal
passively, as has been requested.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP</dt>
<dd>
<p>Used by an intermediary to indicate that none of the identity
providers in an &lt;IDPList&gt; are supported by the intermediary.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:PartialLogout</dt>
<dd>
<p>Used by a session authority to indicate to a session participant that
it was not able to propagate logout to all other session participants.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded</dt>
<dd>
<p>Indicates that a responding provider cannot authenticate the principal
directly and is not permitted to proxy the request further.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:RequestDenied</dt>
<dd>
<p>The SAML responder or SAML authority is able to process the request
but has chosen not to respond. This status code MAY be used when
there is concern about the security context of the request message or
the sequence of request messages received from a particular requester.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported</dt>
<dd>
<p>The SAML responder or SAML authority does not support the request.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated</dt>
<dd>
<p>The SAML responder cannot process any requests with the protocol
version specified in the request.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh</dt>
<dd>
<p>The SAML responder cannot process the request because the protocol
version specified in the request message is a major upgrade from the
highest protocol version supported by the responder.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow</dt>
<dd>
<p>The SAML responder cannot process the request because the protocol
version specified in the request message is too low.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized</dt>
<dd>
<p>The resource value provided in the request message is invalid or
unrecognized.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:TooManyResponses</dt>
<dd>
<p>The response message would contain more elements than the SAML
responder is able to return.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile</dt>
<dd>
<p>An entity that has no knowledge of a particular attribute profile has
been presented with an attribute drawn from that profile.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal</dt>
<dd>
<p>The responding provider does not recognize the principal specified or
implied by the request.</p>
</dd>
<dt class="hdlist1">urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding</dt>
<dd>
<p>The SAML responder cannot properly fulfill the request using the
protocol binding specified in the request.</p>
</dd>
</dl>
</div>
</div>
<div class="sect2">
<h3 id="_status_code_examples">8.3. Status code examples</h3>
<div class="listingblock">
<div class="title">Example of a <code>Status</code> indicating success.</div>
<div class="content">
<pre class="highlight"><code class="language-xml" data-lang="xml">&lt;samlp:Status&gt;
&lt;samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/&gt; <i class="conum" data-value="1"></i><b>(1)</b>
&lt;/samlp:Status&gt;</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td><em>Top-level status code:</em> Because the top-level status code is
<code>Success</code> no other status information is included.</td>
</tr>
</table>
</div>
<div id="invalid_nameid_example" class="listingblock">
<div class="title">Example of a <code>Status</code> indicating failure due to invalid NameIDPolicy.</div>
<div class="content">
<pre class="highlight"><code class="language-xml" data-lang="xml">&lt;samlp:Status&gt;
&lt;samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Requester"&gt; <i class="conum" data-value="1"></i><b>(1)</b>
&lt;samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy"/&gt; <i class="conum" data-value="2"></i><b>(2)</b>
&lt;/samlp:StatusCode&gt;
&lt;/samlp:Status&gt;</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td><em>Top-level status code:</em> Because the top-level status code is
<strong>not</strong> <code>Success</code> this top-level status code indicates a <strong>failure</strong> and
the <em>primary</em> reason for the failure. In this instance, the requester
sent a value the receiver was unable to process.</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td><em>Second-level status code:</em> This second-level status code provides
the additional information describing what the requester sent that
could not be acted upon. In this case, the requester sent a
<code>NameIDPolicy</code> the IdP was unable to fulfill.</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="find_status_code">8.4. Finding the <code>StatusCode</code></h3>
<div class="paragraph">
<p>Recent versions of Mellon (&gt;= 0.13.1) will log any non-success status
in both the Apache error log and in the Mellon diagnostics log (if
enabled). The log message for the above <code>InvalidNameIDPolicy</code> error
will look like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>"StatusCode1="urn:oasis:names:tc:SAML:2.0:status:Requester", StatusCode2="urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy", "StatusMessage="(null)"</pre>
</div>
</div>
<div class="paragraph">
<p>Or you have the option to examine the SAML message as described in <a href="#gather_runtime_info">Gathering run-time information</a>.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="gather_runtime_info">9. Gathering run-time information</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_apache_log_files">9.1. Apache log files</h3>
<div class="paragraph">
<p>Mellon writes messages to the Apache server error log file. Depending
on your Apache configuration, those messages might appear in either
<code>/var/log/httpd/error_log</code> or <code>/var/log/httpd/ssl_error_log</code>. You can
turn up the verbosity of the messages by modifying the Apache
<code>LogLevel</code>, for example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>LogLevel debug</pre>
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Mellon&#8217;s use of standard Apache logging is limited. See
<a href="#mellon_diagnostics">Mellon Diagnostics</a> for a much better way to capture Mellon run
time information.
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="trace_saml_flow">9.2. Trace SAML flow</h3>
<div class="paragraph">
<p>Since you&#8217;re most likely using the SAML Web-SSO profile, which is
entirely browser based, you can use any of the browser tools to watch
HTTP requests and responses. The Firefox web browser provides the
FireBug add-on and the Chrome browser offers Developer Tools. Each of
these browsers also has additional add-ons to display SAML messages;
see <a href="#inspect_saml_messages">Inspect SAML messages</a>.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
The easiest and most complete way to trace HTTP requests and
responses during SAML flow, capture SAML messages, and examine how
Mellon processes a SAML message is to use <a href="#mellon_diagnostics">Mellon Diagnostics</a>.
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="inspect_saml_messages">9.3. Inspect SAML messages</h3>
<div class="paragraph">
<p>There are many times when you need to see the content of a SAML
message. Perhaps you don&#8217;t know what attributes your IdP is returning
in an assertion. Or the SAML transaction is failing for some reason
and you need to diagnose why. In such cases being able to see the
contents of the SAML messages can be immensely helpful.</p>
</div>
<div class="paragraph">
<p>Examining the on-the-wire SAML data is seldom useful, even when it&#8217;s
contained in otherwise visible HTTP data elements such as query
parameters, post data, etc. This is because the various SAML bindings
encode the message in different ways. It may break the message into
independent components which need to be reassembled at the receiving
end, or it may encode the data in a variety of formats which need to be
decoded to recover the original message content. It&#8217;s best to use SAML-aware
tools to examine SAML messages, because they know how to decode
and reassemble the raw SAML data into the final SAML message the
receiver evaluates.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
The easiest and most complete way to capture SAML messages and
examine how Mellon processes a SAML message is to use
<a href="#mellon_diagnostics">Mellon Diagnostics</a>. If your version of Mellon supports diagnostics
you may wish to skip to this section.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>The Web-SSO SAML profile is by far the most commonly used. Because all
SAML messages transit though the browser in Web-SSO, it is possible to
write a browser extension to capture and decode the SAML messages
exchanged between the SP and IdP.</p>
</div>
<div class="sect3">
<h4 id="saml_tracer">9.3.1. Firefox SAML Tracer</h4>
<div class="paragraph">
<p>The Firefox
<a href="https://addons.mozilla.org/en-US/firefox/addon/saml-tracer/">SAML
Tracer</a> Add-On will display decoded SAML messages used during single
sign-on and single logout. SAML Tracer is not capable of decrypting
an encrypted IdP response, because it does not have access to the IdP&#8217;s
public encryption key contained in the IdP&#8217;s metadata. See
<a href="#encrypted_response">If the IdP response is encrypted</a> for how to deal with this issue.</p>
</div>
<div class="paragraph">
<p>To use SAML Tracer you must first install the add-on. Then each time
you want to use SAML Tracer you will need to go to the Firefox menu
and select the SAML Tracer option. This will bring up a separate
Firefox window which looks like this:</p>
</div>
<div class="imageblock">
<div class="content">
<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiCiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbm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AiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU
</div>
</div>
<div class="paragraph">
<p>The SAML Tracer window is divided into two panes: a list of
HTTP requests in the top pane, and detailed information on the selected
request in the bottom window.</p>
</div>
<div class="paragraph">
<p>SAML Tracer examines each HTTP request and response, and if it detects
it is a SAML message, it flags the request in the request list window
at the top with a "SAML" icon.</p>
</div>
<div class="paragraph">
<p>In the detail pane are different tabs which show you the
request/response information in different views. In order to view the
decoded SAML message you need to make the <code>SAML</code> tab active. The
<code>Parameters</code> tab shows you the query parameters (either URL or POST).
SAML messages are usually transported in HTTP parameters, so this is
where you can see the raw SAML data before being decoded into a
complete SAML message. The <code>http</code> tab shows you the HTTP headers
associated with the HTTP request/response.</p>
</div>
</div>
<div class="sect3">
<h4 id="_chrome_saml_chrome_panel">9.3.2. Chrome, SAML Chrome Panel</h4>
<div class="paragraph">
<p>The Chrome Web browser offers several add-ons to display SAML
messages. The most commonly used is
<a href="https://chrome.google.com/webstore/detail/saml-chrome-panel/paijfdbeoenhembfhkhllainmocckace">SAML
Chrome Panel</a>. SAML Chrome Panel integrates with the Chrome developer
tools.</p>
</div>
<div class="paragraph">
<p>Here is an example of the SAML Chrome Panel in the developer tools
panel:</p>
</div>
<div class="imageblock">
<div class="content">
<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiCiAgIHhtbG5zOnJkZj0i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ryb2tlLXdpZHRoOjAuNjI1O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2U6IzAwMDAwMDtzdHJva2Utb3BhY2l0eToxO2ZpbGw6IzAwMDAwMDtmaWxsLW9wYWNpdHk6MSIKICAgICAgICAgaWQ9InBhdGg0ODQzIiAvPgogICAgPC9tYXJrZXI+CiAgICA8bWFya2VyCiAgICAgICBpbmtzY2FwZTpzdG9ja2lkPSJBcnJvdzJMZW5kIgogICAgICAgb3JpZW50PSJhdXRvIgogICAgICAgcmVmWT0iMC4wIgogICAgICAgcmVmWD0iMC4wIgogICAgICAgaWQ9Im1hcmtlcjQ2MjEiCiAgICAgICBzdHlsZT0ib3ZlcmZsb3c6dmlzaWJsZTsiCiAgICAgICBpbmtzY2FwZTppc3N0b2NrPSJ0cnVlIj4KICAgICAgPHBhdGgKICAgICAgICAgaWQ9InBhdGg0NjE5IgogICAgICA
</div>
</div>
</div>
<div class="sect3">
<h4 id="encrypted_response">9.3.3. If the IdP response is encrypted</h4>
<div class="paragraph">
<p>Data in a SAML response may be encrypted for confidentiality (usually
encryption is not needed because SAML transactions should be occurring
over a secure TLS channel). Decrypting the data requires access to the
IdP&#8217;s public encryption key contained in its metadata. Most SAML
browser tools do not support decryption. If you discover your tool is
showing you encrypted data you have a few options:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Disable encryption at the IdP. See your IdP&#8217;s documentation on how
to enable/disable encryption.</p>
</li>
<li>
<p>Use <a href="#mellon_diagnostics">Mellon Diagnostics</a>. The diagnostics support in Mellon
operates after the SAML message is decoded from its SAML binding
transport and after it&#8217;s been decrypted into a final plaintext SAML
XML document. Most people will find Mellon diagnostics to be the
easiest and most complete capture of SAML data and Mellon&#8217;s processing
of it.</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect2">
<h3 id="inspect_mellon_env">9.4. Inspecting Mellon environment variables</h3>
<div class="paragraph">
<p>Recall that Mellon communicates with web apps by inserting Apache
environment variables into the Apache environment. While diagnosing
problems or when initially setting up your Mellon deployment it can be
very useful to see the contents of the Apache environment. The typical
way this is done is to substitute the resource Mellon is protecting
with a script that dumps the environment it received. So instead of
getting back the resource, after Mellon successfully authenticates the
script runs and returns a page listing the environment variables. Once
you&#8217;ve collected this information you need to remove the script from
the protected URL so the protected resource will be returned
instead of a data dump.</p>
</div>
<div class="paragraph">
<p>If your installed version of Mellon includes support for
<a href="#mellon_diagnostics">Mellon Diagnostics</a>, there is no need to alter your protected
resource in order to get an environment variable dump. The diagnostics
log includes a dump of the complete Apache environment at the end of
each response. This is a much easier and more complete solution than
substituting a script for your protected resource.</p>
</div>
<div class="sect3">
<h4 id="_python_wsgi_environment_dump">9.4.1. Python WSGI Environment Dump</h4>
<div class="paragraph">
<p>Create a script with the following content:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-python" data-lang="python">import pprint
import webob
import webob.dec
@webob.dec.wsgify
def application(req):
return webob.Response(pprint.pformat(req.environ),
content_type='application/json')</code></pre>
</div>
</div>
<div class="paragraph">
<p>Placing the above script in the Apache <code>cgi-bin</code> directory is a good
idea. We&#8217;ll name this script 'dump-env'.</p>
</div>
<div class="paragraph">
<p>Add a <code>WSGIScriptAlias</code> directive to your Apache configuration so that
it runs the above script when the protected resource URL is
requested. For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>WSGIScriptAlias "/private/info.html" "/var/www/cgi-bin/dump-env"</pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_php_environment_dump">9.4.2. PHP Environment Dump</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-php" data-lang="php">&lt;?php
header('Content-Type: text/plain');
foreach($_SERVER as $key=&gt;$value) {
if(substr($key, 0, 7) == 'MELLON_') {
echo($key . '=' . $value . "\r\n");
}
}
?&gt;</code></pre>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="mellon_diagnostics">9.5. Mellon Diagnostics</h3>
<div class="paragraph">
<p>When something goes wrong with your Mellon deployment, experience has
shown that it can be frustratingly difficult to gather sufficient
information to diagnose the problem. Often you will need access to the
following pieces of information:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Mellon configuration</p>
</li>
<li>
<p>Mellon metadata</p>
</li>
<li>
<p>IdP metadata</p>
</li>
<li>
<p>HTTP requests and responses</p>
</li>
<li>
<p>HTTP headers</p>
</li>
<li>
<p>SAML message content as decoded pretty XML</p>
</li>
<li>
<p>Apache environment variables</p>
</li>
<li>
<p>Session infomation</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Although Mellon does log some <code>DEBUG</code> messages to the Apache error log,
that information is often incomplete and mixed in with other
irrelevant messages. The SAML message content has to be gathered
independently via other tools (<a href="#inspect_saml_messages">Inspect SAML messages</a>), configuring
Apache to log all HTTP headers is obscure and verbose, there is no
easy way to log all Apache environment variables associated with a
request, and the SAML metadata and Mellon configuration is independent of
the log data. Finally all these indpendent pieces of data gathered from
multiple sources need to be correlated to produce a coherent
sequence while at the same time removing a lot of extraneous irrelevant
non-SAML data.</p>
</div>
<div class="paragraph">
<p>Apache logging also suffers from some serious limitations when trying
to record SAML data. Apache enforces a hard limit on the length of a
log message, which often results in truncating SAML messages. Apache
log messages are reformatted, newlines are removed, and other characters
are escaped. This makes trying to read XML documents extremely
difficult unless you post-process the log.</p>
</div>
<div class="paragraph">
<p>If you are a support person trying to help an administrator with their
Mellon deployment, it is very difficult to get a 3rd party who is not
familiar with the various operations to gather the necessary
information in a cohesive form amenable for remote diagnostic review.</p>
</div>
<div class="paragraph">
<p>It would be really nice if Mellon could gather all this information in
protocol sequence in a single file without other irrelevant Apache
messages, and without the need for any post-processing of the log data.</p>
</div>
<div class="paragraph">
<p>Mellon has been extended to gather all the above relevant information
in a human readable format. The feature is called <em>Mellon
Diagnostics</em>. The diagnostics feature is new as of July 2017, and it
must be enabled at compile time; thus your version of Mellon may not
have it. Because the feature is new the format and content of the
diagnostic data is expected to evolve.</p>
</div>
<div class="sect3">
<h4 id="using_mellon_diagnostics">9.5.1. Using Mellon Diagnostics</h4>
<div class="paragraph">
<p>Currently Mellon diagnostics supports these new Mellon
directives. These directives are module level and as such should be
declared outside of any location blocks in your Apache configuration.</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">MellonDiagnosticFile</dt>
<dd>
<p>If Mellon was built with diagnostic capability then diagnostic is
written here, it may be either a filename or a pipe. If it&#8217;s a
filename then the resulting path is relative to the ServerRoot. If
the value is preceeded by the pipe character "|" it should be followed
by a path to a program to receive the log information on its standard
input. Default: <code>logs/mellon_diagnostics</code></p>
</dd>
<dt class="hdlist1">MellonDiagnosticEnable</dt>
<dd>
<p>If Mellon was built with diagnostic capability then this is a list of
words controlling diagnostic output. Currently only <code>On</code> and <code>Off</code> are
supported. Default: <code>Off</code></p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>To enable diagnostic logging add this line to your Apache
configuration file where you keep your Mellon configuration.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>MellonDiagnosticEnable On</pre>
</div>
</div>
<div class="paragraph">
<p>Restart Apache and perform some operation that involves Mellon. In
your Apache log directory will be a file called <code>mellon_diagnostics</code>
(or whatever <code>MellonDiagnosticFile</code> was set to).</p>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
Diagnostic logging may potentially contain security
sensitive information. Diagnostic logging is verbose and will generate
large files. Therefore <em>you should enable diagnostic logging only for
the minimum duration necessary</em>.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>You may wish to review diagnostic output in
<a href="#mellon_diagnostics_example">Example Mellon Diagnostics</a> captured when the demo authentication
was executed.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_potential_problems">10. Potential Problems</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_it_s_the_metadata">10.1. It&#8217;s the metadata</h3>
<div class="paragraph">
<p><strong>The vast majority of SAML deployment problems can be traced
back to metadata.</strong></p>
</div>
<div class="ulist">
<ul>
<li>
<p>Is your metadata current?</p>
</li>
<li>
<p>Have you loaded your most recent SP metadata? Did you restart Apache
after modifying the SP metadata?</p>
</li>
<li>
<p>Has your IdP loaded the exactly the same metadata Mellon is reading
at Apache start-up?</p>
</li>
<li>
<p>Have you loaded your most recent IdP metadata? Did you restart Apache
after modifying the SP metadata?</p>
</li>
<li>
<p>Did you make a change to your entityID?</p>
</li>
<li>
<p>Did you make a change to the <code>MellonEndpointPath</code> without
regenerating your SP metadata and loading the new metadata into both
Mellon and your IdP? Remember the <code>MellonEndpointPath</code> establishes
all the SAML endpoint URLs that appear in your metadata.
See <a href="#incorrect_mellon_endpoint_path">Incorrect MellonEndpointPath</a> and <a href="#mellon_endpoint_path">MellonEndpointPath</a>.</p>
</li>
<li>
<p>Did you modify any of the keys or certs without both updating the
mellon config <em>and</em> your SP metadata?</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="_behavior_does_not_change_after_modifying_any_saml_file">10.2. Behavior does not change after modifying any SAML file</h3>
<div class="paragraph">
<p>Mellon reads its configuration at Apache start-up. If you make any
change to any file Mellon reads, you will not see those changes
reflected until after you restart Apache.</p>
</div>
</div>
<div class="sect2">
<h3 id="_are_the_mellon_configuration_directives_syntactically_correct">10.3. Are the Mellon configuration directives syntactically correct?</h3>
<div class="paragraph">
<p>Apache will not start if there is any error in any of the
configuration files it reads. An easy way to test the correctness of
your Apache configuration directives <em>without starting the server and
examining the error logs</em> is to use the the <code>apachectl</code>
command line tool with the <code>configtest</code> option:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>apachectl configtest</pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_no_authnrequest_sent_to_idp">10.4. No AuthnRequest sent to IdP</h3>
<div class="paragraph">
<p>During debugging you may discover the entire <a href="#web_sso_flow">Web-SSO
flow</a> is not executed, so the IdP is never contacted. This is because
Mellon implements sessions. The session identifier is communicated in
the cookie <code>mellon-cookie</code> (or whatever is the current value of the
Mellon directive <code>MellonVariable</code>). If you had previously
successfully authenticated against the IdP, the browser will have been
sent the Mellon session ID in its cookie. When Mellon gets a request
to authenticate a resource, it first checks to see if it has a valid
session based on the identifier passed as the Mellon cookie. If there
is a valid session, Mellon will use that cached session information
instead of contacting the IdP. Deleting the <code>mellon-cookie</code> from the
browser will cause Mellon to believe there is no pre-existing
session.</p>
</div>
</div>
<div class="sect2">
<h3 id="incorrect_mellon_endpoint_path">10.5. Incorrect MellonEndpointPath</h3>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><a href="#mellon_endpoint_path"><code>MellonEndpointPath</code></a></p>
</li>
</ol>
</div>
<div class="listingblock">
<div class="content">
<pre> &lt;Location /&gt;
MellonEndpointPath <mark>/mellon/</mark> <i class="conum" data-value="1"></i><b>(1)</b>
&lt;/Location&gt;</pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>The definition of <code>MellonEndpointPath</code> in your Apache Mellon
configuration <strong>must</strong> match the path component in each of your
Service <code>Location</code> declarations in your SP metadata. See
<a href="#mellon_endpoint_path">MellonEndpointPath</a> for more detail.</td>
</tr>
</table>
</div>
<div class="listingblock">
<div class="content">
<pre>&lt;SPSSODescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com<mark>/mellon/</mark>logout" /&gt; <i class="conum" data-value="1"></i><b>(1)</b>
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com<mark>/mellon/</mark>logout" /&gt; <i class="conum" data-value="1"></i><b>(1)</b>
&lt;AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com<mark>/mellon/</mark>postResponse" /&gt; <i class="conum" data-value="1"></i><b>(1)</b>
&lt;AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com<mark>/mellon/</mark>artifactResponse" /&gt; <i class="conum" data-value="1"></i><b>(1)</b>
&lt;AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com<mark>/mellon/</mark>paosResponse" /&gt; <i class="conum" data-value="1"></i><b>(1)</b>
&lt;/SPSSODescriptor&gt;</pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>Each Service <code>Location</code> URL in your SP metadata <strong>must</strong> have a path
component that starts with your <code>MellonEndpointPath</code> and appends
exactly one directory component to it. That final directory component
is one of the Mellon endpoints as described in
<a href="#mellon_endpoints">Mellon Endpoints</a>. Here the <code>MellonEndpointPath</code> is highlighted in
the <code>Location</code> attributes of the metadata.</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="invalid_destination">10.6. HTTP_BAD_REQUEST - Invalid Destination on Response</h3>
<div class="paragraph">
<p>If after posting the Assertion to your <code>postResponse</code> endpoint you get
a HTTP_BAD_REQUEST error with status code 400 and a page that says:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>Your browser sent a request that this server could not understand.</pre>
</div>
</div>
<div class="paragraph">
<p>and in the Apache log file there is a Mellon message like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>Invalid Destination on Response. Should be: https://xxx/mellon/postResponse</pre>
</div>
</div>
<div class="paragraph">
<p>Then you have failed one of the SAML security checks. There is a SAML
requirement that the recipient of a message verifies that the intended
destination of the message is the actual SAML endpoint it was received
on. This is to prevent malicious forwarding of messages to unintended
recipients.</p>
</div>
<div class="paragraph">
<p>To perform this check, what Mellon does is build a URL by asking Apache
what scheme, hostname, and port it is running under, and then appends
the <a href="#mellon_endpoint_path">MellonEndpointPath</a> and the Mellon
endpoint to it. This becomes the URL the message was received
on. Mellon then does a string comparison to see if this manufactured
URL is identical to the <code>Destination</code> attribute in the SAML
message. If they are not the same string, the test fails and a
HTTP_BAD_REQUEST is returned.</p>
</div>
<div class="paragraph">
<p>There are two potential causes for this failure:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Incorrect Apache <code>ServerName</code>. See the <a href="#apache_servername">Apache
ServerName</a> discussion for more details. This problem usually occurs
when Mellon is running behind a load balancer or SSL terminator.</p>
</li>
<li>
<p>Mismatch between the Mellon metadata and the <code>MellonEndpointPath</code> in
your Mellon configuration. If the scheme, hostname, and port are
correct then the problem must be in path component of the URL. The
SAML <code>Destination</code> attribute is read from the provider&#8217;s metadata. The
<code>MellonEndpointPath</code> is read from Mellon&#8217;s configuration. The two must
be in sync. Verify that the location endpoints in Mellon&#8217;s metadata match
the value of <code>MellonEndpointPath</code>. See the discussion of
<a href="#mellon_endpoint_path">MellonEndpointPath</a> for more details.
The <code>Destination</code> check may also fail because one URL has an explicit
port but the other does not. This can occur with the standard HTTP port
80 and HTTPS port 443: see <a href="#standard_port_issue">Standard Ports</a> for
more detail.</p>
</li>
</ol>
</div>
</div>
<div class="sect2">
<h3 id="_mellon_metadata_out_of_sync_with_mellon_configuration">10.7. Mellon metadata out of sync with Mellon configuration</h3>
<div class="paragraph">
<p>Mellon&#8217;s metadata and its Apache configuration directives
have data elements in common but are maintained independently. The
Apache configuration directives in common with the metadata are:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>MellonSPentityId</code></p>
</li>
<li>
<p><code>MellonSPPrivateKeyFile</code></p>
</li>
<li>
<p><code>MellonSPCertFile</code></p>
</li>
<li>
<p><code>MellonEndpointPath</code></p>
</li>
</ul>
</div>
<div class="paragraph">
<p>This can lead to problems if you:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Generate metadata not consistent with these values in your Apache
configuration directives.</p>
</li>
<li>
<p>Edit the above Apache configuration directives without regenerating
and reloading your metadata.</p>
</li>
<li>
<p>Fail to load the current SP metadata by restarting Apache.</p>
</li>
<li>
<p>Fail to load the current SP metadata into the IdP.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>You may wish to review <a href="#metadata_creation">How is Mellon metadata created?</a> and <a href="#mellon_endpoint_path">MellonEndpointPath</a>.</p>
</div>
</div>
<div class="sect2">
<h3 id="_microsoft_adfs_issues">10.8. Microsoft ADFS issues</h3>
<div class="paragraph">
<p>It is common to have problems when using Microsoft ADFS as a SAML IdP.</p>
</div>
<div class="paragraph">
<p>This blog post from Microsoft contains many of the ADFS configuration
issues encountered when adding an SP to ADFS:
<a id="adfs_blog"></a><a href="https://blogs.technet.microsoft.com/askpfeplat/2015/03/01/adfs-deep-dive-onboarding-applications/">ADFS Deep Dive Onboarding Applications</a></p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
ADFS calls SPs a "Relying Party" and the SP configuration a
"Relying Party Trust".
</td>
</tr>
</table>
</div>
<div class="sect3">
<h4 id="adfs_sig_alg">10.8.1. ADFS Signature Algorithm</h4>
<div class="paragraph">
<p>One of the <code>Relying Party Trust</code> options is the "Secure Hash
Algorithm" which controls the signature algorithm used to produce an
XML signature on the SAML message. This is the signature algorithm
ADFS will use to sign the SAML messages it emits. SAML does not require
both parties to use the same signature algorithm; in theory, it&#8217;s fine
if Mellon as the SP signs with one algorithm and ADFS as the IdP signs
with a different algorithm. But ADFS enforces the requirement that the
SP signs with same algorithm as set in the <code>Relying Party Trust</code>. If
ADFS receives a SAML message signed with a different algorithm than
what is specified in the <code>Relying Party Trust</code> configuration, you will
get a message in the ADFS log like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>SAML request is not signed with expected signature algorithm. SAML
request is signed with signature algorithm
http://www.w3.org/2001/04/xmldsig-more#rsa-sha1 . Expected signature
algorithm is http://www.w3.org/2000/09/xmldsig#rsa-sha256</pre>
</div>
</div>
<div class="paragraph">
<p>Since SHA-1 is no longer considered secure, many ADFS administrators set
their <code>Relying Party Trust</code> secure hash algorithm to SHA-256. This
causes problems for Mellon versions earlier than 0.13.1, which
always signed its messages with the SHA-1 hash (specifically the
RSA-SHA1 algorithm) and there was no mechanism to specify a
different signing algorithm. See <a href="#adfs_blog">ADFS Deep Dive Blog</a> for how to modify the
<code>Relying Party Trust</code> Secure Hash Algorithm.</p>
</div>
<div class="paragraph">
<p>Mellon versions greater than 0.13.1 added a new configuration option
called <code>MellonSignatureMethod</code> which allows you to match the signature
algorithm emitted by Mellon to the one specified in the ADFS <code>Relying
Party Trust</code> for the Mellon SP. For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>MellonSignatureMethod rsa-sha256</pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="adfs_nameid_policy">10.8.2. ADFS NameIDPolicy</h4>
<div class="paragraph">
<p>By default ADFS cannot handle many of the SAML NameID formats without
additional configuration in the <code>Relying Party Trust</code>. Please make
sure you are familiar with the material in the section <a href="#name_id">Username, userid, SAML NameID</a>. By
default, Mellon will generate SP metadata with a
<a href="#nameid_policy">NameIDPolicy</a> of <code>transient</code>, see
<a href="#specify_mellon_nameid">How do you specify the NameID format in SAML?</a> for how to modify this in Mellon.</p>
</div>
<div class="paragraph">
<p>When ADFS receives a SAML message with a <code>NameIDPolicy</code> set to a
specific format, it is supposed to respond with a <code>NameID</code> matching that
format. Because of the architecture of ADFS, it may not have access to
the data needed to generate that <code>NameID</code>. The necessary data is
contained in a <em>Claim</em> controlled by a <em>Claim Rule</em>. To get the
contents of the <em>Claim</em> being used to populate the SAML <code>NameID</code>, you
must also add a <code>Claim Rule Transform</code> that maps the desired <em>Claim</em>
data into a SAML data element, which in this case is the <code>NameID</code>.</p>
</div>
<div class="paragraph">
<p>Examples of the <code>NameID</code> formats which require this additional
configuration in ADFS are <code>transient</code>, <code>persistent</code>, <code>email</code> and
possibly others. If the <em>Claim Rule</em> and <em>Claim Rule Transform</em> are
not configured for the <code>NameIDPolicy</code> in the request, ADFS will respond
with a <code>InvalidNameIDPolicy</code> error status because it cannot provide
the requested <code>NameID</code> format. See <a href="#invalid_nameid_example">NameID
error example</a> in the <a href="#error_response">error response section</a> for
an example of this error and how to identify it.</p>
</div>
<div class="paragraph">
<p>This Microsoft blog discusses <code>NameID</code> configuration in ADFS:
<a id="adfs_nameid"></a><a href="https://blogs.msdn.microsoft.com/card/2010/02/17/name-identifiers-in-saml-assertions/">ADFS
- Name Identifiers in SAML assertions</a></p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_time_sync">10.9. Time Sync</h3>
<div class="paragraph">
<p>SAML, like many authentication protocols (e.g. Kerberos), relies on
timestamps to validate messages. If you see one of these errors in the
httpd logs:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>[auth_mellon:error] [pid xxx] [client xxx] NotBefore in Condition was in the future.
[auth_mellon:error] [pid xxx] [client xxx] NotOnOrAfter in Condition was in the past.</pre>
</div>
</div>
<div class="paragraph">
<p>Then it&#8217;s likely that either the Mellon node or the IdP node are not time
synchronized. You can check the status of your time sync with the
<code>chronyc</code> command line tool, for example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>$ chronyc sources
210 Number of sources = 4
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? tock.no-such-agency.net 0 10 0 10y +0ns[ +0ns] +/- 0ns
^? static-74-104-167-114.bst 0 10 0 10y +0ns[ +0ns] +/- 0ns
^? 69.195.159.158 0 10 0 10y +0ns[ +0ns] +/- 0ns
^? freemont.nerdboy.net.au 0 10 0 10y +0ns[ +0ns] +/- 0ns</pre>
</div>
</div>
<div class="paragraph">
<p>If the <code>Reach</code> column has zeros in it you are not synchronizing your
clock. This may be due to a firewall blocking the NTP port. Trying
opening your NTP port or using a different server in <code>/etc/chrony.conf</code>.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_glossary">11. Glossary</h2>
<div class="sectionbody">
<div class="dlist">
<dl>
<dt class="hdlist1">entityID</dt>
<dd>
<p>The unique name of a SAML provider. The entityID <strong>must</strong> be
a URI. Often entityID&#8217;s are URLs, however the choice of using a
URL as an entityID does not have any meaning in SAML other than it is
a convenient way to to have a unique URI. It is best to choose an
entityID that will not change over time as SAML services inevitably
migrate between hosts in a deployment. Once again, an entityID is <strong><em>a
unique name for a SAML service</em></strong>, it is nothing more than that.</p>
</dd>
<dt class="hdlist1">Assertion</dt>
<dd>
<p>Data produced by a SAML authority (e.g. IdP) with respect
to a specific subject. The assertion may convey authentication of the
subject, attributes associated with the subject, or authorization
information for the subject in regards to a specific resource.</p>
</dd>
<dt class="hdlist1">Identity Provider</dt>
<dd>
<p>An identity provider is a SAML authority which
<em>provides</em> authentication services proving the identity of a
principal. The proof of identity is conveyed in a SAML assertion along
with additional information about the subject (attributes) which the
service provider may choose to utilize when making authorization
decisions.</p>
</dd>
<dt class="hdlist1">IdP</dt>
<dd>
<p>Acronym for Identity Provider</p>
</dd>
<dt class="hdlist1">Profile</dt>
<dd>
<p>A profile is a set of rules for one of several purposes; each set is given a
name in the pattern “xxx profile of SAML” or “xxx SAML profile”.</p>
<div class="ulist">
<ul>
<li>
<p>Rules for how to embed assertions into and extract them
from a protocol or other context of use.</p>
</li>
<li>
<p>Rules for using SAML protocol messages in a particular
context of use.</p>
</li>
<li>
<p>Rules for mapping attributes expressed in SAML to
another attribute representation system. Such a set of
rules is known as an “attribute profile”.</p>
</li>
</ul>
</div>
</dd>
<dt class="hdlist1">SAML</dt>
<dd>
<p>Security Assertion Markup Language.</p>
</dd>
<dt class="hdlist1">Service Provider</dt>
<dd>
<p>A service provider is a SAML <em>relying party</em> which
<em>provides</em> a <em>service</em> to a user who must be authenticated and
authorized by the service in order to use the service. A web
application is a common example.</p>
</dd>
<dt class="hdlist1">SP</dt>
<dd>
<p>Acronym for Service Provider.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_appendix">Appendix A: Appendix</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="authentication_request_wire">A.1. Example On-The-Wire AuthnRequest</h3>
<div class="paragraph">
<p>This is is the "on the wire" HTTP data for the
<a href="#authentication_request">&lt;AuthnRequest&gt; Example</a> using the <em>HTTP Redirect Binding</em>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>GET https://rhsso.example.com:8443/auth/realms/test/protocol/saml?SAMLRequest=hZJBT8JAEIX%2FSrN32NKWAptCQkASEjQE1IMXs6lj2KS7W3emiv%2FeaRHFi5w2eTsvb76XKVDbqlbzhg5uB28NIEVHWzlU3cdUNMEpr9GgctoCKirVfn67UUk%2FVnXw5EtfiQvL%2Fw6NCIGMdyJaL6fieTgZJPkiTeP8JstHk1U%2BTOMkWcWLbDkfreJMRI8QkOengu1sQmxg7ZC0I5biwagX571kfD9IVTpRg%2BxJREtmME5T5zoQ1aikDAdE34ejtnUF%2FdJbNc6yVGrmlgF0ZVES%2B%2BQZSbYsIlp4h9BG%2FQdVnoZU2YTAb89whikNiWjlQwldt1PxqiuElmDLJZh3%2BFHm507asMZC2EN4NyU87Da%2F%2B1uoKu8uAb4lWXukHWDdLiFmRbu36moKs%2BtmC6RfNOlCXvqK01HcMel6ufUM89miWH2liFYxL73XblRR0A4NF8KIHPax4J6JsSk0IOTsFPn39GZf&amp;RelayState=https%3A%2F%2Fmellon.example.com%2Fprivate%2Finfo.html&amp;SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&amp;Signature=GJ%2BC%2BEwcPpOmAfYwMdMcAPSkX2y1Da634jrm1oWWs8Ozyb7P%2FumIk9HaNbfJZvaHc6HyOxYXhCpqb6NJrRm%2BrY1NSOJqjtt3kXldNLKecFfhKamzfOfAufKTPGGSZNAuwRTiQCkrLuFt8A%2BezEuCswNDADSRJGLL9aYX8A8G23IcLeVuqobtrCH9bSr2wgO0uy61o1s5bDlA6ceKwrjle%2F6TofFUWBYOB6pzRL40AzmNsvKieHqSOCxo6uNKQdEZQYomF9fi%2FuCPovIn5AdRFC1wcx%2BeGYi%2BDS6R4lbEnrhu8RfEmxhA8PJHDoTMH2fcfD0jyUh%2BejtLdqCUFJ9ppQ%3D%3D HTTP/1.1</pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="assertion_response_wire">A.2. Example On-the-Wire &lt;Assertion&gt; response</h3>
<div class="paragraph">
<p>This is is the "on the wire" HTTP data for the <a href="#assertion_response">&lt;Assertion&gt; Example</a>
using the <em>HTTP Post Binding</em>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>&lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;SAML HTTP Post Binding&lt;/TITLE&gt;&lt;/HEAD&gt;&lt;BODY Onload=\"document.forms[0].submit()\"&gt;&lt;FORM METHOD=\"POST\" ACTION=\"https://mellon.example.com/mellon/postResponse\"&gt;&lt;INPUT TYPE=\"HIDDEN\" NAME=\"SAMLResponse\" VALUE=\"PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIERlc3RpbmF0aW9uPSJodHRwczovL21lbGxvbi5leGFtcGxlLmNvbS9tZWxsb24vcG9zdFJlc3BvbnNlIiBJRD0iSURfZDA2ZGFhYWYtNjRlYy00NGQzLTk1YTctMDhkYTg5M2FhOWQ1IiBJblJlc3BvbnNlVG89Il81OTEyNkMzMzA2RTQ2NzlGNjUzMDIyRjBDNERBN0YwNCIgSXNzdWVJbnN0YW50PSIyMDE3LTA2LTI4VDEzOjM5OjI3LjMzMVoiIFZlcnNpb249IjIuMCI+PHNhbWw6SXNzdWVyIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iPmh0dHBzOi8vcmhzc28uZXhhbXBsZS5jb206ODQ0My9hdXRoL3JlYWxtcy90ZXN0PC9zYW1sOklzc3Vlcj48ZHNpZzpTaWduYXR1cmUgeG1sbnM6ZHNpZz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnIyI+PGRzaWc6U2lnbmVkSW5mbz48ZHNpZzpDYW5vbmljYWxpemF0aW9uTWV0a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CZkxrWThnRHFlRDdWSG5aR09QM244Q0F3RUFBVEFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBSkE5cUt6TnhPU0FmRmdLejlMZlkzbHFMQ3c0RXM1VTI1QW9ZY3MxRENRbWljclpuUVNRdUxWQXJoSEJBelRsbmFsWHo2aE1FZjh5YXIzd242a3ZKMXdUaDJJK3dDb2w4aVROckV0K3lpaUdzYXgrVG1ZMkxFWCtpdG9zMkFUeEFNL3dJY0xaaTJSamRva2xqakQ3cVpyVVBiVEVTQnczTnFOOERJN0gwcEVPYWNDTVR2bUFhNVRmeXpkTGxKbzYyUWFraWpZelZsTi9kSVQ2UlkxdytwV0o3TzRSL0Fyci9XMlI4aHl4SEF3QVIxOGRBa1pWWkUyRjZ0TUFqWkx5WnZiaEZnTjBWMHdhdWpBbGw0K1RnNHhsWWdMMGI5M3dEZzJiWmJURmh5NjdyVUJqbHFLMWRxb2ZXVzdiMUgwRG54eElYeVE3aENCRzVxUnd3eXQ3Z1JBPT08L2RzaWc6WDUwOUNlcnRpZmljYXRlPjwvZHNpZzpYNTA5RGF0YT48ZHNpZzpLZXlWYWx1ZT48ZHNpZzpSU0FLZXlWYWx1ZT48ZHNpZzpNb2R1bHVzPmpIc0dGbFpoZ1p3bFJlNXZwb2E0cFl2VisvczNqUWN6eWJ2aDFSQ3Ard1pQRko1NWorN0lJcjdSZEliNUpEdjZPWXMvc1gzbWVGSURQRVpCcUdtdk9BZjBoSURSWTZSMGhqbDdXbHhXMGNObERmckRvdlV0cTNKbG40N2luMVpHajM0dUFJN21EekZXa2M3eDZWMUxHdXZROFBZdGpSVkwrN0FNRzl6VkNNNG9wY1lab0sxZ0MwS1N5QkZUQ2pHZ1lScjJIRFN5OGlGaDQ5NG56RzlINFIwazYyUXV0eTB5ODA0NWdhOHZy
</div>
</div>
</div>
<div class="sect2">
<h3 id="mellon_diagnostics_example">A.3. Example Mellon Diagnostics</h3>
<div class="paragraph">
<p>Here is the diagnostics output as described in <a href="#mellon_diagnostics">Mellon Diagnostics</a>
for our authentication example.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>---------------------------------- New Request ---------------------------------
GET - /saml-test/protected.html
log_id: (null)
server: name=/etc/httpd/conf.d/ssl.conf, scheme=https hostname=mellon.example.com port=443
pid: 21576, tid: 140251630954624
unparsed_uri: /saml-test/protected.html
uri: /saml-test/protected.html
path_info:
filename: /var/www/html/saml-test/protected.html
query args: (null)
Request Headers:
Host: mellon.example.com
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
DNT: 1
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8
Cookie: mellon-cookie=aa8aefac8bc813f194b1a8d97e3a4058
Mellon Directory Configuration for URL: /saml-test/protected.html
MellonEnable (enable): auth
MellonVariable (varname): cookie
MellonSecureCookie (secure): Off
MellonMergeEnvVars (merge_env_vars): (null)
MellonEnvVarsIndexStart (env_vars_index_start): -1
MellonEnvVarsSetCount (env_vars_count_in_n): On
MellonCookieDomain (cookie_domain): (null)
MellonCookiePath (cookie_path): (null)
MellonCond (cond): 0 items
MellonSetEnv (envattr): 0 items
MellonUser (userattr): NAME_ID
MellonIdP (idpattr): IDP
MellonSessionDump (dump_session): Off
MellonSamlResponseDump (dump_saml_response): Off
MellonEndpointPath (endpoint_path): /mellon/
MellonSPMetadataFile (sp_metadata_file):
pathname: "/etc/httpd/saml2/demo_sp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
entityID="https://mellon.example.com/mellon/metadata"&gt;
&lt;SPSSODescriptor
AuthnRequestsSigned="true"
WantAssertionsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;ds:KeyInfo&gt;
&lt;ds:X509Data&gt;
&lt;ds:X509Certificate&gt;MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV
BAMMEm1lbGxvbi5leGFtcGxlLmNvbTAeFw0xNzA4MjgxNTExNDlaFw0yMjA4Mjcx
NTExNDlaMB0xGzAZBgNVBAMMEm1lbGxvbi5leGFtcGxlLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdRcgsO24zHIU/o5bzWGp+P3P6ALuzFHpTx
tE8jiAWI2OQ0X7gczKsq1W1/ADlYnW0nghpluDh8ZqmIJxZDm2OO5nsKlnpct6Sr
rc4auSBnE2bwv4CO9ES/vyJHgzJzjHrJs3UvBCdX6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3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648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com/mellon/postResponse" /&gt;
&lt;AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com/mellon/artifactResponse" /&gt;
&lt;AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com/mellon/paosResponse" /&gt;
&lt;/SPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
MellonSPPrivateKeyFile (sp_private_key_file):
pathname: "/etc/httpd/saml2/demo.key"
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHUXILDtuMxyFP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DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=
-----END CERTIFICATE-----
MellonIdPPublicKeyFile (idp_public_key_file):
file_data: NULL
MellonIdPCAFile (idp_ca_file):
file_data: NULL
MellonIdPMetadataFile (idp_metadata): 1 items
[ 0] Metadata
pathname: "/etc/httpd/saml2/demo_keycloak_ipa_idp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ 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.
--&gt;
&lt;EntitiesDescriptor Name="urn:keycloak" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;EntityDescriptor entityID="https://rhsso.example.com:8443/auth/realms/ipa"&gt;
&lt;IDPSSODescriptor WantAuthnRequestsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;R2OGk9W0luNm_NtZbURWOrPlvFzSTDMimCVK5N1Mj5U&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;MIIClTCCAX0CBgFeFdE9pDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANpcGEwHhcNMTcwODI0MTk1NDQ3WhcNMjcwODI0MTk1NjI3WjAOMQwwCgYDVQQDDANpcGEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgIPeag+JJmhtAkIGBwUT/req+jKC6c0Vl1Ngtzbcd07CP9mq1DomBkjuWl59J2urlEfrV4yT8avia0eYE6Dm/TqC74SHt3TVtiUliynAh/z2JvFlLb/EbGePSKrMnuNV8rV75YGcyE12vBRooUPx3hGaygsfaSOg+BijDuCSpbVdWSdVx9VecsWJfxSochOZUj6yvm/qTb8Ptl0x/o7/b/16GgjFRIKSFrdk8pVtMn1wCzpQQoGVHZmp1jrppGcp8KXIK54q7b4pPiTzlW6xhBgrmW2RtWQesCmN8ga1CVeBZKLsaH7argwGH5Ttz31iensqUO0degFu6nwCltgTVAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFx8dl6RDle65q3IHIiGaL5fbJK5HxQiMXpk4N5riWQTP4g6xoTNAG4OFFUd4uRxt2ovdEdkbzhEy2lV4x626QdEfK5V9QKppupsTxTGA/4NMW9QCocAvFSpmYErmJIhfy6zzELoBK4Dpfcc3u1peHx2686msx6ExARF116d+5Xaps1dmPPy3yb2cCKzKbLhieqv+aLLrwz657ERUc4OnqEMEmmHFhHvPI7LRlS4AQ1/s1QlKcM9yqcu8WN3yKM/kuvZtZ0YTCSIl9W1b+I5v8wNoVFB22s7rfxs3DfJFaIImaTmRzaDX0MXgibEckrkigpO+anKe9B9z8CJdtlUHco=&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/NameIDFormat&gt;
&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;/IDPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
&lt;/EntitiesDescriptor&gt;
[ 0] Chain File
file_data: NULL
MellonIdPIgnore (idp_ignore):
MellonSPentityId (sp_entity_id): (null)
MellonOrganizationName (sp_org_name): 0 items
MellonOrganizationDisplayName (sp_org_display_name): 0 items
MellonOrganizationURL (sp_org_url): 0 items
MellonSessionLength (session_length): -1
MellonNoCookieErrorPage (no_cookie_error_page): (null)
MellonNoSuccessErrorPage (no_success_error_page): (null)
MellonDefaultLoginPath (login_path): /
MellonDiscoveryURL (discovery_url): (null)
MellonProbeDiscoveryTimeout (probe_discovery_timeout): -1
MellonProbeDiscoveryIdP (probe_discovery_idp): 0 items
MellonAuthnContextClassRef (authn_context_class_ref): 0 items
MellonSubjectConfirmationDataAddressCheck (subject_confirmation_data_address_check): On
MellonDoNotVerifyLogoutSignature (do_not_verify_logout_signature): 0 items
MellonPostReplay (post_replay): On
MellonECPSendIDPList (ecp_send_idplist): On
enter function am_auth_mellon_user
searching for session with key aa8aefac8bc813f194b1a8d97e3a4058 (session) ... not found
am_auth_mellon_user am_enable_auth, no valid session
[APLOG_DEBUG auth_mellon_util.c:2055] have_paos_media_type=False valid_paos_header=False is_paos=Falseenter function am_start_auth
Loading SP Metadata
pathname: "/etc/httpd/saml2/demo_sp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
entityID="https://mellon.example.com/mellon/metadata"&gt;
&lt;SPSSODescriptor
AuthnRequestsSigned="true"
WantAssertionsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;ds:KeyInfo&gt;
&lt;ds:X509Data&gt;
&lt;ds:X509Certificate&gt;MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV
BAMMEm1lbGxvbi5leGFtcGxlLmNvbTAeFw0xNzA4MjgxNTExNDlaFw0yMjA4Mjcx
NTExNDl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53b9Bhr0TpIOKetFY68kQ=&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com/mellon/postResponse" /&gt;
&lt;AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com/mellon/artifactResponse" /&gt;
&lt;AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com/mellon/paosResponse" /&gt;
&lt;/SPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
Loading IdP Metadata
pathname: "/etc/httpd/saml2/demo_keycloak_ipa_idp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ 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.
--&gt;
&lt;EntitiesDescriptor Name="urn:keycloak" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;EntityDescriptor entityID="https://rhsso.example.com:8443/auth/realms/ipa"&gt;
&lt;IDPSSODescriptor WantAuthnRequestsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;R2OGk9W0luNm_NtZbURWOrPlvFzSTDMimCVK5N1Mj5U&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;MIIClTCCAX0CBgFeFdE9pDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANpcGEwHhcNMTcwODI0MTk1NDQ3WhcNMjcwODI0MTk1NjI3WjAOMQwwCgYDVQQDDANpcGEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgIPeag+JJmhtAkIGBwUT/req+jKC6c0Vl1Ngtzbcd07CP9mq1DomBkjuWl59J2urlEfrV4yT8avia0eYE6Dm/TqC74SHt3TVtiUliynAh/z2JvFlLb/EbGePSKrMnuNV8rV75YGcyE12vBRooUPx3hGaygsfaSOg+BijDuCSpbVdWSdVx9VecsWJfxSochOZUj6yvm/qTb8Ptl0x/o7/b/16GgjFRIKSFrdk8pVtMn1wCzpQQoGVHZmp1jrppGcp8KXIK54q7b4pPiTzlW6xhBgrmW2RtWQesCmN8ga1CVeBZKLsaH7argwGH5Ttz31iensqUO0degFu6nwCltgTVAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFx8dl6RDle65q3IHIiGaL5fbJK5HxQiMXpk4N5riWQTP4g6xoTNAG4OFFUd4uRxt2ovdEdkbzhEy2lV4x626QdEfK5V9QKppupsTxTGA/4NMW9QCocAvFSpmYErmJIhfy6zzELoBK4Dpfcc3u1peHx2686msx6ExARF116d+5Xaps1dmPPy3yb2cCKzKbLhieqv+aLLrwz657ERUc4OnqEMEmmHFhHvPI7LRlS4AQ1/s1QlKcM9yqcu8WN3yKM/kuvZtZ0YTCSIl9W1b+I5v8wNoVFB22s7rfxs3DfJFaIImaTmRzaDX0MXgibEckrkigpO+anKe9B9z8CJdtlUHco=&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/NameIDFormat&gt;
&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;/IDPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
&lt;/EntitiesDescriptor&gt;
[APLOG_DEBUG auth_mellon_handler.c:3498] Redirecting to login URL: https://mellon.example.com/mellon/login?ReturnTo=https%3A%2F%2Fmellon.example.com%2Fsaml%2Dtest%2Fprotected.html&amp;IdP=https%3A%2F%2Frhsso.example.com%3A8443%2Fauth%2Frealms%2Fipa
=== Response ===
Status: 303 See Other(303)
user: (null) auth_type=(null)
Response Headers:
Cache-Control: private, max-age=0, must-revalidate
Location: https://mellon.example.com/mellon/login?ReturnTo=https%3A%2F%2Fmellon.example.com%2Fsaml%2Dtest%2Fprotected.html&amp;IdP=https%3A%2F%2Frhsso.example.com%3A8443%2Fauth%2Frealms%2Fipa
Content-Length: 388
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
Response Error Headers:
Environment:
UNIQUE_ID: WabkjcTYa6iga7y800KGZQAAAAA
---------------------------------- New Request ---------------------------------
GET - /mellon/login
log_id: (null)
server: name=/etc/httpd/conf.d/ssl.conf, scheme=https hostname=mellon.example.com port=443
pid: 21576, tid: 140251630954624
unparsed_uri: /mellon/login?ReturnTo=https%3A%2F%2Fmellon.example.com%2Fsaml%2Dtest%2Fprotected.html&amp;IdP=https%3A%2F%2Frhsso.example.com%3A8443%2Fauth%2Frealms%2Fipa
uri: /mellon/login
path_info: /login
filename: /var/www/html/mellon
query args: ReturnTo=https%3A%2F%2Fmellon.example.com%2Fsaml%2Dtest%2Fprotected.html&amp;IdP=https%3A%2F%2Frhsso.example.com%3A8443%2Fauth%2Frealms%2Fipa
Request Headers:
Host: mellon.example.com
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
DNT: 1
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8
Cookie: mellon-cookie=aa8aefac8bc813f194b1a8d97e3a4058
Mellon Directory Configuration for URL: /mellon/login
MellonEnable (enable): info
MellonVariable (varname): cookie
MellonSecureCookie (secure): Off
MellonMergeEnvVars (merge_env_vars): (null)
MellonEnvVarsIndexStart (env_vars_index_start): -1
MellonEnvVarsSetCount (env_vars_count_in_n): On
MellonCookieDomain (cookie_domain): (null)
MellonCookiePath (cookie_path): (null)
MellonCond (cond): 0 items
MellonSetEnv (envattr): 0 items
MellonUser (userattr): NAME_ID
MellonIdP (idpattr): IDP
MellonSessionDump (dump_session): Off
MellonSamlResponseDump (dump_saml_response): Off
MellonEndpointPath (endpoint_path): /mellon/
MellonSPMetadataFile (sp_metadata_file):
pathname: "/etc/httpd/saml2/demo_sp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
entityID="https://mellon.example.com/mellon/metadata"&gt;
&lt;SPSSODescriptor
AuthnRequestsSigned="true"
WantAssertionsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;ds:KeyInfo&gt;
&lt;ds:X509Data&gt;
&lt;ds:X509Certificate&gt;MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV
BAMMEm1lbGxvbi5leGFtcGxlLmNvbTAeFw0xNzA4MjgxNTExNDlaFw0yMjA4Mjcx
NTExNDlaMB0xGzAZBgNVBAMMEm1lbGxvbi5leGFtcGxlLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdRcgsO24zHIU/o5bzWGp+P3P6ALuzFHpTx
tE8jiAWI2OQ0X7gczKsq1W1/ADlYnW0nghpluDh8ZqmIJxZDm2OO5nsKlnpct6Sr
rc4auSBnE2bwv4CO9ES/vyJHgzJzjHrJs3UvBCdX6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ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/ADlYnW0nghpluDh8ZqmIJxZDm2OO5nsKlnpct6Sr
rc4auSBnE2bwv4CO9ES/vyJHgzJzjHrJs3UvBCdX6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com/mellon/postResponse" /&gt;
&lt;AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com/mellon/artifactResponse" /&gt;
&lt;AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com/mellon/paosResponse" /&gt;
&lt;/SPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
MellonSPPrivateKeyFile (sp_private_key_file):
pathname: "/etc/httpd/saml2/demo.key"
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHUXILDtuMxyFP
6OW81hqfj9z+gC7sxR6U8bRPI4gFiNjkNF+4HMyrKtVtfwA5WJ1tJ4IaZbg4fGap
iCcWQ5tjjuZ7CpZ6XLekq63OGrkgZxNm8L+AjvREv78iR4Myc4x6ybN1LwQnV+oD
F0i9SAEPnfJCaCA+1+DC3RKy7+xtK3SVimUWwAHmkNU6N0wCVSNYn1KgnxBSCPTx
2DifbyRl21SiokCfLSnktE++WBzRzldSxzMrkSfFoS7/uT232tbdw2NsJmHGLRGk
myBrEC6BVhQ746NM1cLDtrOots7bNfZ3yfb3W1tpoKVOhM2se3OTKdidAQsaGlVu
7QIhBqinAgMBAAECggEBAJtU662WfJ9vqJRgCnpp2QG02iM0vl0jGbw1ybFLHXxC
s9TUxCv1tcNHdGEK8p++YaFpgskTsMfEmzVPuDZvpa+m9BO7op3ll/CrIp5W0SNh
cQtuX6/OuKrDTC9oz+QHjNk8S7DtXS1UJDkYckWg0cLb8qqx/z86eh0isKnmtLg2
H1+6L6mB9fcZldkcrU+kXT+dcDX85skMZAeBsrG4yaoX26AzVl8lEl2rJAQvpxj8
5wGBC4riWY6TzMYiCjcS5JfZIlbhcZe61ej3A48NVBSKCP1XKo0xbKuOHIQuMeeW
wSaboBwRzJ9JdTXlq5UWfLvmjXDc/HCwk/N7cj021uECgYEA5KkQr3cSKrMIkYoO
H0Vnkw1kYYGUjtTL00Nfdkv7uGMF122nyt1ND0gpdS0jgNx3LSEam/gY35UWEjGH
i8DGD04k8pvKDUsl8cuYPcC3oce1lLCGAnw+aHPC5wtA829CLOLtBfxXIhVAI0tp
ECosD/A63/m1LC19XolOd10/PC8CgYEA3yZChEYZupDGJFZltiy0ZgUarvD2Ss4N
QiRVR+CmpBrOKZdD8q6uUuqWQN9Rw7kXm8LxAPYwiIDVjxjYALF+j7/9Q1oZyKuv
eHJdMe4eRUeqeaIKbxnFfKwGZ5rj97jwPrkUCxio75KZhpOcDHMSgBCBtzW0XIZl
gTeQYOshZQkCgYB5TK6LRnEesabj/gaL1DejrMEJcMIsGvqdceocSSaZo/4fUA5o
8YjFiJRlkrJ403ttN1h0UOJxCReSQzASlQr8Z4n2IWrILotMf6Kdb7R6YAUVgac1
fk9k/bPw+OlVujmyshbmy/w1GmzRzFlJt/Vz5w50bnULoH4XPmOfspmvBQKBgBcJ
rihVzGY0eCBcQxfxuZYmxMB25BaI+1luwtcu3EVo9wvYMA2n9xtcWLLN23UncMaF
87ezswMEugeR+wrnSDezDISdkrfi8bSvqetzt/BTG8h+8DDUKk1avTaJCSwUDcmL
9gPHQfmp2uvH5X5riudpzNqLUtmSjnwurlszKzlxAoGAR8STlDJhNph+p3cF8k25
ydT1kypxnjzVG8CAV5/h3dUmc7j7gyV8NlWZfWacxMZWOBsrdVh0zhMNUPiLJaGd
I1isOkmiN9JFYMMhHSnhPnTCIjmu6uBLxf8wotHAvzWOJPV7lUZbw21KIN3DS79F
sGZ2QzGYn4inHG4UHClhZxU=
-----END PRIVATE KEY-----
MellonSPCertFile (sp_cert_file):
pathname: "/etc/httpd/saml2/demo.cert"
-----BEGIN CERTIFICATE-----
MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GC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_public_key_file):
file_data: NULL
MellonIdPCAFile (idp_ca_file):
file_data: NULL
MellonIdPMetadataFile (idp_metadata): 1 items
[ 0] Metadata
pathname: "/etc/httpd/saml2/demo_keycloak_ipa_idp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ 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.
--&gt;
&lt;EntitiesDescriptor Name="urn:keycloak" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;EntityDescriptor entityID="https://rhsso.example.com:8443/auth/realms/ipa"&gt;
&lt;IDPSSODescriptor WantAuthnRequestsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;R2OGk9W0luNm_NtZbURWOrPlvFzSTDMimCVK5N1Mj5U&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;MIIClTCCAX0CBgFeFdE9pDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANpcGEwHhcNMTcwODI0MTk1NDQ3WhcNMjcwODI0MTk1NjI3WjAOMQwwCgYDVQQDDANpcGEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgIPeag+JJmhtAkIGBwUT/req+jKC6c0Vl1Ngtzbcd07CP9mq1DomBkjuWl59J2urlEfrV4yT8avia0eYE6Dm/TqC74SHt3TVtiUliynAh/z2JvFlLb/EbGePSKrMnuNV8rV75YGcyE12vBRooUPx3hGaygsfaSOg+BijDuCSpbVdWSdVx9VecsWJfxSochOZUj6yvm/qTb8Ptl0x/o7/b/16GgjFRIKSFrdk8pVtMn1wCzpQQoGVHZmp1jrppGcp8KXIK54q7b4pPiTzlW6xhBgrmW2RtWQesCmN8ga1CVeBZKLsaH7argwGH5Ttz31iensqUO0degFu6nwCltgTVAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFx8dl6RDle65q3IHIiGaL5fbJK5HxQiMXpk4N5riWQTP4g6xoTNAG4OFFUd4uRxt2ovdEdkbzhEy2lV4x626QdEfK5V9QKppupsTxTGA/4NMW9QCocAvFSpmYErmJIhfy6zzELoBK4Dpfcc3u1peHx2686msx6ExARF116d+5Xaps1dmPPy3yb2cCKzKbLhieqv+aLLrwz657ERUc4OnqEMEmmHFhHvPI7LRlS4AQ1/s1QlKcM9yqcu8WN3yKM/kuvZtZ0YTCSIl9W1b+I5v8wNoVFB22s7rfxs3DfJFaIImaTmRzaDX0MXgibEckrkigpO+anKe9B9z8CJdtlUHco=&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/NameIDFormat&gt;
&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;/IDPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
&lt;/EntitiesDescriptor&gt;
[ 0] Chain File
file_data: NULL
MellonIdPIgnore (idp_ignore):
MellonSPentityId (sp_entity_id): (null)
MellonOrganizationName (sp_org_name): 0 items
MellonOrganizationDisplayName (sp_org_display_name): 0 items
MellonOrganizationURL (sp_org_url): 0 items
MellonSessionLength (session_length): -1
MellonNoCookieErrorPage (no_cookie_error_page): (null)
MellonNoSuccessErrorPage (no_success_error_page): (null)
MellonDefaultLoginPath (login_path): /
MellonDiscoveryURL (discovery_url): (null)
MellonProbeDiscoveryTimeout (probe_discovery_timeout): -1
MellonProbeDiscoveryIdP (probe_discovery_idp): 0 items
MellonAuthnContextClassRef (authn_context_class_ref): 0 items
MellonSubjectConfirmationDataAddressCheck (subject_confirmation_data_address_check): On
MellonDoNotVerifyLogoutSignature (do_not_verify_logout_signature): 0 items
MellonPostReplay (post_replay): On
MellonECPSendIDPList (ecp_send_idplist): On
enter function am_auth_mellon_user
enter function am_handle_login
Loading SP Metadata
pathname: "/etc/httpd/saml2/demo_sp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
entityID="https://mellon.example.com/mellon/metadata"&gt;
&lt;SPSSODescriptor
AuthnRequestsSigned="true"
WantAssertionsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;ds:KeyInfo&gt;
&lt;ds:X509Data&gt;
&lt;ds:X509Certificate&gt;MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV
BAMMEm1lbGxvbi5leGFtcGxlLmNvbTAeFw0xNzA4MjgxNTExNDlaFw0yMjA4Mjcx
NTExNDlaMB0xGzAZBgNVBAMMEm1lbGxvbi5leGFtcGxlLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdRcgsO24zHIU/o5bzWGp+P3P6ALuzFHpTx
tE8jiAWI2OQ0X7gczKsq1W1/ADlYnW0nghpluDh8ZqmIJxZDm2OO5nsKlnpct6Sr
rc4auSBnE2bwv4CO9ES/vyJHgzJzjHrJs3UvBCdX6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1Gh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oZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com/mellon/postResponse" /&gt;
&lt;AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com/mellon/artifactResponse" /&gt;
&lt;AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com/mellon/paosResponse" /&gt;
&lt;/SPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
Loading IdP Metadata
pathname: "/etc/httpd/saml2/demo_keycloak_ipa_idp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ 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.
--&gt;
&lt;EntitiesDescriptor Name="urn:keycloak" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;EntityDescriptor entityID="https://rhsso.example.com:8443/auth/realms/ipa"&gt;
&lt;IDPSSODescriptor WantAuthnRequestsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;R2OGk9W0luNm_NtZbURWOrPlvFzSTDMimCVK5N1Mj5U&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;MIIClTCCAX0CBgFeFdE9pDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANpcGEwHhcNMTcwODI0MTk1NDQ3WhcNMjcwODI0MTk1NjI3WjAOMQwwCgYDVQQDDANpcGEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgIPeag+JJmhtAkIGBwUT/req+jKC6c0Vl1Ngtzbcd07CP9mq1DomBkjuWl59J2urlEfrV4yT8avia0eYE6Dm/TqC74SHt3TVtiUliynAh/z2JvFlLb/EbGePSKrMnuNV8rV75YGcyE12vBRooUPx3hGaygsfaSOg+BijDuCSpbVdWSdVx9VecsWJfxSochOZUj6yvm/qTb8Ptl0x/o7/b/16GgjFRIKSFrdk8pVtMn1wCzpQQoGVHZmp1jrppGcp8KXIK54q7b4pPiTzlW6xhBgrmW2RtWQesCmN8ga1CVeBZKLsaH7argwGH5Ttz31iensqUO0degFu6nwCltgTVAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFx8dl6RDle65q3IHIiGaL5fbJK5HxQiMXpk4N5riWQTP4g6xoTNAG4OFFUd4uRxt2ovdEdkbzhEy2lV4x626QdEfK5V9QKppupsTxTGA/4NMW9QCocAvFSpmYErmJIhfy6zzELoBK4Dpfcc3u1peHx2686msx6ExARF116d+5Xaps1dmPPy3yb2cCKzKbLhieqv+aLLrwz657ERUc4OnqEMEmmHFhHvPI7LRlS4AQ1/s1QlKcM9yqcu8WN3yKM/kuvZtZ0YTCSIl9W1b+I5v8wNoVFB22s7rfxs3DfJFaIImaTmRzaDX0MXgibEckrkigpO+anKe9B9z8CJdtlUHco=&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/NameIDFormat&gt;
&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;/IDPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
&lt;/EntitiesDescriptor&gt;
SAML AuthnRequest: http_method=LASSO_HTTP_METHOD_REDIRECT
&lt;samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_A65FF17C0924D19BE0FEC241B49EA45C" Version="2.0" IssueInstant="2017-08-30T16:15:09Z" Destination="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" Consent="urn:oasis:names:tc:SAML:2.0:consent:current-implicit" SignType="0" SignMethod="0" ForceAuthn="false" IsPassive="false" AssertionConsumerServiceURL="https://mellon.example.com/mellon/postResponse"&gt;
&lt;saml:Issuer&gt;https://mellon.example.com/mellon/metadata&lt;/saml:Issuer&gt;
&lt;samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" AllowCreate="true"/&gt;
&lt;/samlp:AuthnRequest&gt;
=== Response ===
Status: 303 See Other(303)
user: (null) auth_type=(null)
Response Headers:
Cache-Control: private, max-age=0, must-revalidate
Set-Cookie: mellon-cookie=cookietest; Version=1; Path=/; Domain=mellon.example.com;
Location: https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml?SAMLRequest=hZLNbsIwEIRfJfIdnED4syBSSEBCohWCtodeKisswlJsp94NpW9fJ5SWXsrJ0nhHs99opyh1WYm0pqPZwnsNSMFZlwZF%2BzFjtTPCSlQojNSAggqxSx%2FWotcNReUs2cKW7Mbyv0MigiNlDQtW%2BYy9pcPBchmNsnDSi%2FNoMl%2BEy0XWi6N5PFmk8SBjwQs49PMz5u3ehFjDyiBJQ14Ko1EnHHf64VM0FNFAhJNXFuSeQRlJretIVKHg3B0RbRfOUlcldAurxTiO%2B1x6bu5Alhq5qiS%2FEvEGhQWZNQhN0n9MxWVIFLVz%2Fu0oH6EKRSxYWldAW%2B2MHWSJ0ABsfAfqBD9Keq2kCas1uB24kyrgebv%2BXV9DWVpzu%2F%2B3xCuLtAWsmiVYMm32Fm1LLrlv1kByL0lO%2Ba1vermJR0%2B6yjfWw3w2KFreKaJR1L5zaEcFOWlQ%2BUI8og%2F7yHzN5LHJ1cB4con8e3nJFw%3D%3D&amp;RelayState=https%3A%2F%2Fmellon.example.com%2Fsaml-test%2Fprotected.html&amp;SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&amp;Signature=gBd8iP4CvbWajeMQHKOMgc5NBx7i6Kf5gXcbSa54oehMXgpPJJuwlY8BLTH861vGnl7AxaO%2F2soJPai4D96aNowm8hr9FBokjvI%2FjwdEVtRiFlng18DpEXPTE1SAa4cuxWcLE3BAZD2HZ0sW%2F91sRGnymFH9lC4cDiU1pG9OBBI1pBYxjtrAM%2FHvEjDNZ0xYTwji8S6ltrM0bBFbTdftcn5YCwI31SAFVhopbPRTfiEhanTYChbjy7h%2Fp6BHTwfvcLw4Pud98phEIhXTdK4XIJGSN%2BmCYeXHQZPyGnRGZcmfmPrEcIpptT4a5xRkltfJPHUSLnI%2Ft9QsEuYm02%2F4%2BQ%3D%3D
Content-Length: 1318
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
Response Error Headers:
Environment:
UNIQUE_ID: WabkjcTYa6iga7y800KGZgAAAAA
HTTPS: on
SSL_TLS_SNI: mellon.example.com
---------------------------------- New Request ---------------------------------
POST - /mellon/postResponse
log_id: (null)
server: name=/etc/httpd/conf.d/ssl.conf, scheme=https hostname=mellon.example.com port=443
pid: 21593, tid: 140251630954624
unparsed_uri: /mellon/postResponse
uri: /mellon/postResponse
path_info: /postResponse
filename: /var/www/html/mellon
query args: (null)
Request Headers:
Host: mellon.example.com
Connection: keep-alive
Content-Length: 15654
Cache-Control: max-age=0
Origin: https://rhsso.example.com:8443
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
DNT: 1
Referer: https://rhsso.example.com:8443/auth/realms/ipa/login-actions/authenticate?code=qv8kqt2kFiT0YBmG8TIzcNzgxfFp6q_N15M5pS931Eo.caa7c606-3404-4961-8af9-ba27345d1f7b&amp;execution=10aa0b63-d5d9-4960-8ad8-16720df6fc8e
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8
Cookie: mellon-cookie=cookietest
Mellon Directory Configuration for URL: /mellon/postResponse
MellonEnable (enable): info
MellonVariable (varname): cookie
MellonSecureCookie (secure): Off
MellonMergeEnvVars (merge_env_vars): (null)
MellonEnvVarsIndexStart (env_vars_index_start): -1
MellonEnvVarsSetCount (env_vars_count_in_n): On
MellonCookieDomain (cookie_domain): (null)
MellonCookiePath (cookie_path): (null)
MellonCond (cond): 0 items
MellonSetEnv (envattr): 0 items
MellonUser (userattr): NAME_ID
MellonIdP (idpattr): IDP
MellonSessionDump (dump_session): Off
MellonSamlResponseDump (dump_saml_response): Off
MellonEndpointPath (endpoint_path): /mellon/
MellonSPMetadataFile (sp_metadata_file):
pathname: "/etc/httpd/saml2/demo_sp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
entityID="https://mellon.example.com/mellon/metadata"&gt;
&lt;SPSSODescriptor
AuthnRequestsSigned="true"
WantAssertionsSigned="true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wGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com/mellon/postResponse" /&gt;
&lt;AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com/mellon/artifactResponse" /&gt;
&lt;AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com/mellon/paosResponse" /&gt;
&lt;/SPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
MellonSPPrivateKeyFile (sp_private_key_file):
pathname: "/etc/httpd/saml2/demo.key"
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHUXILDtuMxyFP
6OW81hqfj9z+gC7sxR6U8bRPI4gFiNjkNF+4HMyrKtVt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9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=
-----END CERTIFICATE-----
MellonIdPPublicKeyFile (idp_public_key_file):
file_data: NULL
MellonIdPCAFile (idp_ca_file):
file_data: NULL
MellonIdPMetadataFile (idp_metadata): 1 items
[ 0] Metadata
pathname: "/etc/httpd/saml2/demo_keycloak_ipa_idp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ 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.
--&gt;
&lt;EntitiesDescriptor Name="urn:keycloak" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;EntityDescriptor entityID="https://rhsso.example.com:8443/auth/realms/ipa"&gt;
&lt;IDPSSODescriptor WantAuthnRequestsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;R2OGk9W0luNm_NtZbURWOrPlvFzSTDMimCVK5N1Mj5U&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;MIIClTCCAX0CBgFeFdE9pDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANpcGEwHhcNMTcwODI0MTk1NDQ3WhcNMjcwODI0MTk1NjI3WjAOMQwwCgYDVQQDDANpcGEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgIPeag+JJmhtAkIGBwUT/req+jKC6c0Vl1Ngtzbcd07CP9mq1DomBkjuWl59J2urlEfrV4yT8avia0eYE6Dm/TqC74SHt3TVtiUliynAh/z2JvFlLb/EbGePSKrMnuNV8rV75YGcyE12vBRooUPx3hGaygsfaSOg+BijDuCSpbVdWSdVx9VecsWJfxSochOZUj6yvm/qTb8Ptl0x/o7/b/16GgjFRIKSFrdk8pVtMn1wCzpQQoGVHZmp1jrppGcp8KXIK54q7b4pPiTzlW6xhBgrmW2RtWQesCmN8ga1CVeBZKLsaH7argwGH5Ttz31iensqUO0degFu6nwCltgTVAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFx8dl6RDle65q3IHIiGaL5fbJK5HxQiMXpk4N5riWQTP4g6xoTNAG4OFFUd4uRxt2ovdEdkbzhEy2lV4x626QdEfK5V9QKppupsTxTGA/4NMW9QCocAvFSpmYErmJIhfy6zzELoBK4Dpfcc3u1peHx2686msx6ExARF116d+5Xaps1dmPPy3yb2cCKzKbLhieqv+aLLrwz657ERUc4OnqEMEmmHFhHvPI7LRlS4AQ1/s1QlKcM9yqcu8WN3yKM/kuvZtZ0YTCSIl9W1b+I5v8wNoVFB22s7rfxs3DfJFaIImaTmRzaDX0MXgibEckrkigpO+anKe9B9z8CJdtlUHco=&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/NameIDFormat&gt;
&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;/IDPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
&lt;/EntitiesDescriptor&gt;
[ 0] Chain File
file_data: NULL
MellonIdPIgnore (idp_ignore):
MellonSPentityId (sp_entity_id): (null)
MellonOrganizationName (sp_org_name): 0 items
MellonOrganizationDisplayName (sp_org_display_name): 0 items
MellonOrganizationURL (sp_org_url): 0 items
MellonSessionLength (session_length): -1
MellonNoCookieErrorPage (no_cookie_error_page): (null)
MellonNoSuccessErrorPage (no_success_error_page): (null)
MellonDefaultLoginPath (login_path): /
MellonDiscoveryURL (discovery_url): (null)
MellonProbeDiscoveryTimeout (probe_discovery_timeout): -1
MellonProbeDiscoveryIdP (probe_discovery_idp): 0 items
MellonAuthnContextClassRef (authn_context_class_ref): 0 items
MellonSubjectConfirmationDataAddressCheck (subject_confirmation_data_address_check): On
MellonDoNotVerifyLogoutSignature (do_not_verify_logout_signature): 0 items
MellonPostReplay (post_replay): On
MellonECPSendIDPList (ecp_send_idplist): On
enter function am_auth_mellon_user
enter function am_handle_post_reply
Loading SP Metadata
pathname: "/etc/httpd/saml2/demo_sp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
entityID="https://mellon.example.com/mellon/metadata"&gt;
&lt;SPSSODescriptor
AuthnRequestsSigned="true"
WantAssertionsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;ds:KeyInfo&gt;
&lt;ds:X509Data&gt;
&lt;ds:X509Certificate&gt;MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV
BAMMEm1lbGxvbi5leGFtcGxlLmNvbTAeFw0xNzA4MjgxNTExNDlaFw0yMjA4Mjcx
NTExNDlaMB0xGzAZBgNVBAMMEm1lbGxvbi5leGFtcGxlLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdRcgsO24zHIU/o5bzWGp+P3P6ALuzFHpTx
tE8jiAWI2OQ0X7gczKsq1W1/ADlYnW0nghpluDh8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0xGzAZBgNVBAMMEm1lbGxvbi5leGFtcGxlLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdRcgsO24zHIU/o5bzWGp+P3P6ALuzFHpTx
tE8jiAWI2OQ0X7gczKsq1W1/ADlYnW0nghpluDh8ZqmIJxZDm2OO5nsKlnpct6Sr
rc4auSBnE2bwv4CO9ES/vyJHgzJzjHrJs3UvBCdX6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com/mellon/postResponse" /&gt;
&lt;AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com/mellon/artifactResponse" /&gt;
&lt;AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com/mellon/paosResponse" /&gt;
&lt;/SPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
Loading IdP Metadata
pathname: "/etc/httpd/saml2/demo_keycloak_ipa_idp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ 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.
--&gt;
&lt;EntitiesDescriptor Name="urn:keycloak" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;EntityDescriptor entityID="https://rhsso.example.com:8443/auth/realms/ipa"&gt;
&lt;IDPSSODescriptor WantAuthnRequestsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;R2OGk9W0luNm_NtZbURWOrPlvFzSTDMimCVK5N1Mj5U&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;MIIClTCCAX0CBgFeFdE9pDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANpcGEwHhcNMTcwODI0MTk1NDQ3WhcNMjcwODI0MTk1NjI3WjAOMQwwCgYDVQQDDANpcGEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgIPeag+JJmhtAkIGBwUT/req+jKC6c0Vl1Ngtzbcd07CP9mq1DomBkjuWl59J2urlEfrV4yT8avia0eYE6Dm/TqC74SHt3TVtiUliynAh/z2JvFlLb/EbGePSKrMnuNV8rV75YGcyE12vBRooUPx3hGaygsfaSOg+BijDuCSpbVdWSdVx9VecsWJfxSochOZUj6yvm/qTb8Ptl0x/o7/b/16GgjFRIKSFrdk8pVtMn1wCzpQQoGVHZmp1jrppGcp8KXIK54q7b4pPiTzlW6xhBgrmW2RtWQesCmN8ga1CVeBZKLsaH7argwGH5Ttz31iensqUO0degFu6nwCltgTVAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFx8dl6RDle65q3IHIiGaL5fbJK5HxQiMXpk4N5riWQTP4g6xoTNAG4OFFUd4uRxt2ovdEdkbzhEy2lV4x626QdEfK5V9QKppupsTxTGA/4NMW9QCocAvFSpmYErmJIhfy6zzELoBK4Dpfcc3u1peHx2686msx6ExARF116d+5Xaps1dmPPy3yb2cCKzKbLhieqv+aLLrwz657ERUc4OnqEMEmmHFhHvPI7LRlS4AQ1/s1QlKcM9yqcu8WN3yKM/kuvZtZ0YTCSIl9W1b+I5v8wNoVFB22s7rfxs3DfJFaIImaTmRzaDX0MXgibEckrkigpO+anKe9B9z8CJdtlUHco=&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/NameIDFormat&gt;
&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;/IDPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
&lt;/EntitiesDescriptor&gt;
SAMLResponse:
&lt;samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" ID="ID_cd361c13-dc8b-48b6-bc26-4982b07bf772" InResponseTo="_A65FF17C0924D19BE0FEC241B49EA45C" Version="2.0" IssueInstant="2017-08-30T16:15:22.397Z" Destination="https://mellon.example.com/mellon/postResponse" SignType="0" SignMethod="0"&gt;
&lt;saml:Issuer&gt;https://rhsso.example.com:8443/auth/realms/ipa&lt;/saml:Issuer&gt;
&lt;samlp:Status&gt;
&lt;samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/&gt;
&lt;/samlp:Status&gt;
&lt;saml:Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" ID="ID_cf2298f8-981e-4c79-b173-cd3d8e43601b" IssueInstant="2017-08-30T16:15:22.396Z" Version="2.0"&gt;
&lt;saml:Issuer&gt;https://rhsso.example.com:8443/auth/realms/ipa&lt;/saml:Issuer&gt;
&lt;dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;dsig:SignedInfo&gt;
&lt;dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/&gt;
&lt;dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/&gt;
&lt;dsig:Reference URI="#ID_cf2298f8-981e-4c79-b173-cd3d8e43601b"&gt;
&lt;dsig:Transforms&gt;
&lt;dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/&gt;
&lt;dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/&gt;
&lt;/dsig:Transforms&gt;
&lt;dsig:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/&gt;
&lt;dsig:DigestValue&gt;8OlYuzdYW/pu0OoNp9XFxRi1EETiNMZkgUpWOUJ/dG8=&lt;/dsig:DigestValue&gt;
&lt;/dsig:Reference&gt;
&lt;/dsig:SignedInfo&gt;
&lt;dsig:SignatureValue&gt;IuBZQ38BqtUc2Qbyy9BFj3x9BCfDQcoEoGFgOa//GFEwzOxunU9OxyZiod6cr1Z/0WgPeabX1GHJUwv//kf22FA8VLC1afErY4Yis9eUQUFUETyFRoFHjpou/rGz0NsEw4y8nTPN6p1je6jDM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v+aLLrwz657ERUc4OnqEMEmmHFhHvPI7LRlS4AQ1/s1QlKcM9yqcu8WN3yKM/kuvZtZ0YTCSIl9W1b+I5v8wNoVFB22s7rfxs3DfJFaIImaTmRzaDX0MXgibEckrkigpO+anKe9B9z8CJdtlUHco=&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;dsig:KeyValue&gt;
&lt;dsig:RSAKeyValue&gt;
&lt;dsig:Modulus&gt;oCD3moPiSZobQJCBgcFE/63qvoygunNFZdTYLc23HdOwj/ZqtQ6JgZI7lpefSdrq5RH61eMk/Gr4mtHmBOg5v06gu+Eh7d01bYlJYspwIf89ibxZS2/xGxnj0iqzJ7jVfK1e+WBnMhNdrwUaKFD8d4RmsoLH2kjoPgYow7gkqW1XVknVcfVXnLFiX8UqHITmVI+sr5v6k2/D7ZdMf6O/2/9ehoIxUSCkha3ZPKVbTJ9cAs6UEKBlR2ZqdY66aRnKfClyCueKu2+KT4k85VusYQYK5ltkbVkHrApjfIGtQlXgWSi7Gh+2q4MBh+U7c99Ynp7KlDtHXoBbup8ApbYE1Q==&lt;/dsig:Modulus&gt;
&lt;dsig:Exponent&gt;AQAB&lt;/dsig:Exponent&gt;
&lt;/dsig:RSAKeyValue&gt;
&lt;/dsig:KeyValue&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/dsig:Signature&gt;
&lt;saml:Subject&gt;
&lt;saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"&gt;G-e292fc24-74d9-4979-9f81-2c26d85174de&lt;/saml:NameID&gt;
&lt;saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"&gt;
&lt;saml:SubjectConfirmationData InResponseTo="_A65FF17C0924D19BE0FEC241B49EA45C" NotOnOrAfter="2017-08-30T16:20:20.396Z" Recipient="https://mellon.example.com/mellon/postResponse"/&gt;
&lt;/saml:SubjectConfirmation&gt;
&lt;/saml:Subject&gt;
&lt;saml:Conditions NotBefore="2017-08-30T16:15:20.396Z" NotOnOrAfter="2017-08-30T16:16:20.396Z"&gt;
&lt;saml:AudienceRestriction&gt;
&lt;saml:Audience&gt;https://mellon.example.com/mellon/metadata&lt;/saml:Audience&gt;
&lt;/saml:AudienceRestriction&gt;
&lt;/saml:Conditions&gt;
&lt;saml:AuthnStatement AuthnInstant="2017-08-30T16:15:22.397Z" SessionIndex="caa7c606-3404-4961-8af9-ba27345d1f7b"&gt;
&lt;saml:AuthnContext&gt;
&lt;saml:AuthnContextClassRef&gt;urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified&lt;/saml:AuthnContextClassRef&gt;
&lt;/saml:AuthnContext&gt;
&lt;/saml:AuthnStatement&gt;
&lt;saml:AttributeStatement&gt;
&lt;saml:Attribute FriendlyName="List of groups user is a member of" Name="groups" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"&gt;ipausers&lt;/saml:AttributeValue&gt;
&lt;saml:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"&gt;openstack-users&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute Name="Role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"&gt;view-profile&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute Name="Role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"&gt;uma_authorization&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;saml:Attribute Name="Role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"&gt;
&lt;saml:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"&gt;manage-account&lt;/saml:AttributeValue&gt;
&lt;/saml:Attribute&gt;
&lt;/saml:AttributeStatement&gt;
&lt;/saml:Assertion&gt;
&lt;saml:EncryptedAssertion&gt;
&lt;xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"&gt;
&lt;xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/&gt;
&lt;ds:KeyInfo&gt;
&lt;xenc:EncryptedKey&gt;
&lt;xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/&gt;
&lt;xenc:CipherData&gt;
&lt;xenc:CipherValue&gt;m5GHJo1Za6Aejg0O7ZpCZleaNS45qzST8/0qFORoGjfLyNm0+lcquA7L2j/puCuVPWJ2jS4Y8P62iWYbhnATo7IPO3srpcfrAZaPtVlDKVp0ra8knx73h7NNIrbkWS63TZZNRh5OU5MgJRShHEpKq8fbRanRlq1iLODveKgw64W3XYr7vXbVT26/2NrrA7bkPLbK7YUyglmYDHN9PUbEKxKwQiBLnKNvaQgvBZaBPTzYTiBidM1Jllp/mj8QzfwiXCIAS/28iVmDCmjkSN6j33nDDLYU/Cq3rIGOWI8uQiw2oh2PlZi49T3400ffz2L9Tucdm/kjkTbhwWB3b5A1YQ==&lt;/xenc:CipherValue&gt;
&lt;/xenc:CipherData&gt;
&lt;/xenc:EncryptedKey&gt;
&lt;/ds:KeyInfo&gt;
&lt;xenc:CipherData&gt;
&lt;xenc:CipherValue&gt;9agVoiDjgNINUO8G9L+D2vodXqbGgFyWfz2qmHTMEZLqmacSqNsX4bzyS+jE1yA9PR4vZXJsc8JwyQrFAyKcokbJHlIbB+BSUHaqd/5qH6BbA+mt48Er9aExwwEC0IHloIo8pg5WuNZ38+RATP5OVw+du3ZUQ22GWv918YaEOb7i1n36eNYiP9Fv+fCR6jtRaZBqFf/vvROv6ye1dVfDOhhZfflVBbhRKUTgng1eFIxuz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ZtWxiLp93CHdv4zRafwXr9RePjgeR9ix9cnb3PH+qbGIxYLt13gYpwj7eC7kYWKkHbVw0QLf6zm8loXFvXcQhnYbDb0xZDJdoHkBSBiEyoEQcr4Ps86XQHOJX1ez4GQ5d+fuNTkzoI7mts5sV/HW6kfqd/FMfHYH5D//2hYaluwhHXNhMDqHP0o7vLcg3zgRkhNV/csWcA4Vp8v2e7RE+13oLmREbtRa8mZmqQilAWzTjQAsM8Rp2CcoJGfRrdnZCS3t3ukrSNqJEyHjcreIRee82U+hhrdRsoj6kyVlLuhfv3PiNHHO7ockdwKPW/DNxKGii4qUCpkhaSLnsepXCWDk3hZLsS52WEqmNwA2x1y+KYsMiHUh7kYv5iSYWRyjY/eAWAS/dDcdzg7W0JFiefOb4CiHZvLsfv96GOqu6tQB2pb6nkhVH2CMRsCiZK0OqhII+AmB2RMqpbxvw8l5Vml9G4y+VLTlhwIp92bZ8nHI7j3khqn8dUGf+ZHAInt7XujFlP/p9uy2oV3dEPTPVZGxuQJgfNbGYYF5pUNotp831FL4MA4sUdLXa114JrRo9bWnDOXBrR+04ZUtpfaBehmKxMIVufy8
&lt;/xenc:CipherData&gt;
&lt;/xenc:EncryptedData&gt;
&lt;/saml:EncryptedAssertion&gt;
&lt;/samlp:Response&gt;
am_new_request_session id=9cf3ebac4e542827e276dc064ce8c4e4 cookie_token="Name='mellon-cookie' Domain='mellon.example.com' Path='/'"
am_cache_new created new session, id=9cf3ebac4e542827e276dc064ce8c4e4 at 2017-08-30T16:15:23Z cookie_token="Name='mellon-cookie' Domain='mellon.example.com' Path='/'"
am_handle_session_expire failed to find Assertion.AuthnStatement.SessionNotOnOrAfter
add_attributes name=groups value=ipausers
add_attributes name=groups value=openstack-users
add_attributes name=Role value=view-profile
add_attributes name=Role value=uma_authorization
add_attributes name=Role value=manage-account
[APLOG_DEBUG auth_mellon_handler.c:549] The current LassoProfile object doesn't contain a LassoIdentity object.
=== Response ===
Status: 303 See Other(303)
user: (null) auth_type=(null)
Response Headers:
Cache-Control: private, max-age=0, must-revalidate
Set-Cookie: mellon-cookie=9cf3ebac4e542827e276dc064ce8c4e4; Version=1; Path=/; Domain=mellon.example.com;
Location: https://mellon.example.com/saml-test/protected.html
Content-Length: 258
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
Response Error Headers:
Environment:
UNIQUE_ID: Wabkm2fzHRm5EyVgPZnqEAAAAAU
HTTPS: on
SSL_TLS_SNI: mellon.example.com
---------------------------------- New Request ---------------------------------
GET - /saml-test/protected.html
log_id: (null)
server: name=/etc/httpd/conf.d/ssl.conf, scheme=https hostname=mellon.example.com port=443
pid: 21593, tid: 140251630954624
unparsed_uri: /saml-test/protected.html
uri: /saml-test/protected.html
path_info:
filename: /var/www/html/saml-test/protected.html
query args: (null)
Request Headers:
Host: mellon.example.com
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
DNT: 1
Referer: https://rhsso.example.com:8443/auth/realms/ipa/login-actions/authenticate?code=qv8kqt2kFiT0YBmG8TIzcNzgxfFp6q_N15M5pS931Eo.caa7c606-3404-4961-8af9-ba27345d1f7b&amp;execution=10aa0b63-d5d9-4960-8ad8-16720df6fc8e
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8
Cookie: mellon-cookie=9cf3ebac4e542827e276dc064ce8c4e4
Mellon Directory Configuration for URL: /saml-test/protected.html
MellonEnable (enable): auth
MellonVariable (varname): cookie
MellonSecureCookie (secure): Off
MellonMergeEnvVars (merge_env_vars): (null)
MellonEnvVarsIndexStart (env_vars_index_start): -1
MellonEnvVarsSetCount (env_vars_count_in_n): On
MellonCookieDomain (cookie_domain): (null)
MellonCookiePath (cookie_path): (null)
MellonCond (cond): 0 items
MellonSetEnv (envattr): 0 items
MellonUser (userattr): NAME_ID
MellonIdP (idpattr): IDP
MellonSessionDump (dump_session): Off
MellonSamlResponseDump (dump_saml_response): Off
MellonEndpointPath (endpoint_path): /mellon/
MellonSPMetadataFile (sp_metadata_file):
pathname: "/etc/httpd/saml2/demo_sp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
entityID="https://mellon.example.com/mellon/metadata"&gt;
&lt;SPSSODescriptor
AuthnRequestsSigned="true"
WantAssertionsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;ds:KeyInfo&gt;
&lt;ds:X509Data&gt;
&lt;ds:X509Certificate&gt;MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV
BAMMEm1lbGxvbi5leGFtcGxlLmNvbTAeFw0xNzA4MjgxNTExNDlaFw0yMjA4Mjcx
NTExNDlaMB0xGzAZBgNVBAMMEm1lbGxvbi5leGFtcGxlLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdRcgsO24zHIU/o5bzWGp+P3P6ALuzFHpTx
tE8jiAWI2OQ0X7gczKsq1W1/ADlYnW0nghpluDh8ZqmIJxZDm2OO5nsKlnpct6Sr
rc4auSBnE2bwv4CO9ES/vyJHgzJzjHrJs3UvBCdX6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdb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MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com/mellon/postResponse" /&gt;
&lt;AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com/mellon/artifactResponse" /&gt;
&lt;AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com/mellon/paosResponse" /&gt;
&lt;/SPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
MellonSPPrivateKeyFile (sp_private_key_file):
pathname: "/etc/httpd/saml2/demo.key"
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHUXILDtuMxyFP
6OW81hqfj9z+gC7sxR6U8bRPI4gFiNjkNF+4HMyrKtVtfwA5WJ1tJ4IaZbg4fGap
iCcWQ5tjjuZ7CpZ6XLekq63OGrkgZxNm8L+AjvREv78iR4Myc4x6ybN1LwQnV+oD
F0i9SAEPnfJCaCA+1+DC3RKy7+xtK3SVimUWwAHmkNU6N0wCVSNYn1KgnxBSCPTx
2DifbyRl21SiokCfLSnktE++WBzRzldSxzMrkSfFoS7/uT232tbdw2NsJmHGLRGk
myBrEC6BVhQ746NM1cLDtrOots7bNfZ3yfb3W1tpoKVOhM2se3OTKdidAQsaGlVu
7QIhBqinAgMBAAECggEBAJtU662WfJ9vqJRgCnpp2QG02iM0vl0jGbw1ybFLHXxC
s9TUxCv1tcNHdGEK8p++YaFpgskTsMfEmzVPuDZvpa+m9BO7op3ll/CrIp5W0SNh
cQtuX6/OuKrDTC9oz+QHjNk8S7DtXS1UJDkYckWg0cLb8qqx/z86eh0isKnmtLg2
H1+6L6mB9fcZldkcrU+kXT+dcDX85skMZAeBsrG4yaoX26AzVl8lEl2rJAQvpxj8
5wGBC4riWY6TzMYiCjcS5JfZIlbhcZe61ej3A48NVBSKCP1XKo0xbKuOHIQuMeeW
wSaboBwRzJ9JdTXlq5UWfLvmjXDc/HCwk/N7cj021uECgYEA5KkQr3cSKrMIkYoO
H0Vnkw1kYYGUjtTL00Nfdkv7uGMF122nyt1ND0gpdS0jgNx3LSEam/gY35UWEjGH
i8DGD04k8pvKDUsl8cuYPcC3oce1lLCGAnw+aHPC5wtA829CLOLtBfxXIhVAI0tp
ECosD/A63/m1LC19XolOd10/PC8CgYEA3yZChEYZupDGJFZltiy0ZgUarvD2Ss4N
QiRVR+CmpBrOKZdD8q6uUuqWQN9Rw7kXm8LxAPYwiIDVjxjYALF+j7/9Q1oZyKuv
eHJdMe4eRUeqeaIKbxnFfKwGZ5rj97jwPrkUCxio75KZhpOcDHMSgBCBtzW0XIZl
gTeQYOshZQkCgYB5TK6LRnEesabj/gaL1DejrMEJcMIsGvqdceocSSaZo/4fUA5o
8YjFiJRlkrJ403ttN1h0UOJxCReSQzASlQr8Z4n2IWrILotMf6Kdb7R6YAUVgac1
fk9k/bPw+OlVujmyshbmy/w1GmzRzFlJt/Vz5w50bnULoH4XPmOfspmvBQKBgBcJ
rihVzGY0eCBcQxfxuZYmxMB25BaI+1luwtcu3EVo9wvYMA2n9xtcWLLN23UncMaF
87ezswMEugeR+wrnSDezDISdkrfi8bSvqetzt/BTG8h+8DDUKk1avTaJCSwUDcmL
9gPHQfmp2uvH5X5riudpzNqLUtmSjnwurlszKzlxAoGAR8STlDJhNph+p3cF8k25
ydT1kypxnjzVG8CAV5/h3dUmc7j7gyV8NlWZfWacxMZWOBsrdVh0zhMNUPiLJaGd
I1isOkmiN9JFYMMhHSnhPnTCIjmu6uBLxf8wotHAvzWOJPV7lUZbw21KIN3DS79F
sGZ2QzGYn4inHG4UHClhZxU=
-----END PRIVATE KEY-----
MellonSPCertFile (sp_cert_file):
pathname: "/etc/httpd/saml2/demo.cert"
-----BEGIN CERTIFICATE-----
MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV
BAMMEm1lbGxvbi5leGFtcGxlLmNvbTAeFw0xNzA4MjgxNTExNDlaFw0yMjA4Mjcx
NTExNDlaMB0xGzAZBgNVBAMMEm1lbGxvbi5leGFtcGxlLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdRcgsO24zHIU/o5bzWGp+P3P6ALuzFHpTx
tE8jiAWI2OQ0X7gczKsq1W1/ADlYnW0nghpluDh8ZqmIJxZDm2OO5nsKlnpct6Sr
rc4auSBnE2bwv4CO9ES/vyJHgzJzjHrJs3UvBCdX6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=
-----END CERTIFICATE-----
MellonIdPPublicKeyFile (idp_public_key_file):
file_data: NULL
MellonIdPCAFile (idp_ca_file):
file_data: NULL
MellonIdPMetadataFile (idp_metadata): 1 items
[ 0] Metadata
pathname: "/etc/httpd/saml2/demo_keycloak_ipa_idp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ 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.
--&gt;
&lt;EntitiesDescriptor Name="urn:keycloak" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;EntityDescriptor entityID="https://rhsso.example.com:8443/auth/realms/ipa"&gt;
&lt;IDPSSODescriptor WantAuthnRequestsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;R2OGk9W0luNm_NtZbURWOrPlvFzSTDMimCVK5N1Mj5U&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;MIIClTCCAX0CBgFeFdE9pDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANpcGEwHhcNMTcwODI0MTk1NDQ3WhcNMjcwODI0MTk1NjI3WjAOMQwwCgYDVQQDDANpcGEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgIPeag+JJmhtAkIGBwUT/req+jKC6c0Vl1Ngtzbcd07CP9mq1DomBkjuWl59J2urlEfrV4yT8avia0eYE6Dm/TqC74SHt3TVtiUliynAh/z2JvFlLb/EbGePSKrMnuNV8rV75YGcyE12vBRooUPx3hGaygsfaSOg+BijDuCSpbVdWSdVx9VecsWJfxSochOZUj6yvm/qTb8Ptl0x/o7/b/16GgjFRIKSFrdk8pVtMn1wCzpQQoGVHZmp1jrppGcp8KXIK54q7b4pPiTzlW6xhBgrmW2RtWQesCmN8ga1CVeBZKLsaH7argwGH5Ttz31iensqUO0degFu6nwCltgTVAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFx8dl6RDle65q3IHIiGaL5fbJK5HxQiMXpk4N5riWQTP4g6xoTNAG4OFFUd4uRxt2ovdEdkbzhEy2lV4x626QdEfK5V9QKppupsTxTGA/4NMW9QCocAvFSpmYErmJIhfy6zzELoBK4Dpfcc3u1peHx2686msx6ExARF116d+5Xaps1dmPPy3yb2cCKzKbLhieqv+aLLrwz657ERUc4OnqEMEmmHFhHvPI7LRlS4AQ1/s1QlKcM9yqcu8WN3yKM/kuvZtZ0YTCSIl9W1b+I5v8wNoVFB22s7rfxs3DfJFaIImaTmRzaDX0MXgibEckrkigpO+anKe9B9z8CJdtlUHco=&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/NameIDFormat&gt;
&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;/IDPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
&lt;/EntitiesDescriptor&gt;
[ 0] Chain File
file_data: NULL
MellonIdPIgnore (idp_ignore):
MellonSPentityId (sp_entity_id): (null)
MellonOrganizationName (sp_org_name): 0 items
MellonOrganizationDisplayName (sp_org_display_name): 0 items
MellonOrganizationURL (sp_org_url): 0 items
MellonSessionLength (session_length): -1
MellonNoCookieErrorPage (no_cookie_error_page): (null)
MellonNoSuccessErrorPage (no_success_error_page): (null)
MellonDefaultLoginPath (login_path): /
MellonDiscoveryURL (discovery_url): (null)
MellonProbeDiscoveryTimeout (probe_discovery_timeout): -1
MellonProbeDiscoveryIdP (probe_discovery_idp): 0 items
MellonAuthnContextClassRef (authn_context_class_ref): 0 items
MellonSubjectConfirmationDataAddressCheck (subject_confirmation_data_address_check): On
MellonDoNotVerifyLogoutSignature (do_not_verify_logout_signature): 0 items
MellonPostReplay (post_replay): On
MellonECPSendIDPList (ecp_send_idplist): On
enter function am_auth_mellon_user
searching for session with key 9cf3ebac4e542827e276dc064ce8c4e4 (session) ... found.
Session Cache Entry
key: 9cf3ebac4e542827e276dc064ce8c4e4
name_id: G-e292fc24-74d9-4979-9f81-2c26d85174de
expires: 2017-08-31T16:15:23Z
access: 2017-08-30T16:15:23Z
logged_in: True
am_auth_mellon_user am_enable_auth, have valid session
am_check_permissions succeeds
=== Response ===
Status: 200 OK(200)
user: G-e292fc24-74d9-4979-9f81-2c26d85174de auth_type=Mellon
Response Headers:
Cache-Control: private, max-age=0, must-revalidate
Last-Modified: Mon, 28 Aug 2017 15:15:18 GMT
ETag: "4a-557d1c33a4519"
Accept-Ranges: bytes
Content-Length: 74
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Response Error Headers:
Cache-Control: private, max-age=0, must-revalidate
Environment:
UNIQUE_ID: Wabkm2fzHRm5EyVgPZnqEQAAAAU
MELLON_NAME_ID: G-e292fc24-74d9-4979-9f81-2c26d85174de
MELLON_NAME_ID_0: G-e292fc24-74d9-4979-9f81-2c26d85174de
MELLON_groups: ipausers
MELLON_groups_0: ipausers
MELLON_groups_1: openstack-users
MELLON_Role: view-profile
MELLON_Role_0: view-profile
MELLON_Role_1: uma_authorization
MELLON_Role_2: manage-account
MELLON_IDP: https://rhsso.example.com:8443/auth/realms/ipa
MELLON_IDP_0: https://rhsso.example.com:8443/auth/realms/ipa
HTTPS: on
SSL_TLS_SNI: mellon.example.com
---------------------------------- New Request ---------------------------------
GET - /favicon.ico
log_id: (null)
server: name=/etc/httpd/conf.d/ssl.conf, scheme=https hostname=mellon.example.com port=443
pid: 21593, tid: 140251630954624
unparsed_uri: /favicon.ico
uri: /favicon.ico
path_info:
filename: /var/www/html/favicon.ico
query args: (null)
Request Headers:
Host: mellon.example.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
Accept: image/webp,image/apng,image/*,*/*;q=0.8
DNT: 1
Referer: https://mellon.example.com/saml-test/protected.html
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8
Cookie: mellon-cookie=9cf3ebac4e542827e276dc064ce8c4e4
Mellon Directory Configuration for URL: /favicon.ico
MellonEnable (enable): info
MellonVariable (varname): cookie
MellonSecureCookie (secure): Off
MellonMergeEnvVars (merge_env_vars): (null)
MellonEnvVarsIndexStart (env_vars_index_start): -1
MellonEnvVarsSetCount (env_vars_count_in_n): On
MellonCookieDomain (cookie_domain): (null)
MellonCookiePath (cookie_path): (null)
MellonCond (cond): 0 items
MellonSetEnv (envattr): 0 items
MellonUser (userattr): NAME_ID
MellonIdP (idpattr): IDP
MellonSessionDump (dump_session): Off
MellonSamlResponseDump (dump_saml_response): Off
MellonEndpointPath (endpoint_path): /mellon/
MellonSPMetadataFile (sp_metadata_file):
pathname: "/etc/httpd/saml2/demo_sp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
entityID="https://mellon.example.com/mellon/metadata"&gt;
&lt;SPSSODescriptor
AuthnRequestsSigned="true"
WantAssertionsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;ds:KeyInfo&gt;
&lt;ds:X509Data&gt;
&lt;ds:X509Certificate&gt;MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV
BAMMEm1lbGxvbi5leGFtcGxlLmNvbTAeFw0xNzA4MjgxNTExNDlaFw0yMjA4Mjcx
NTExNDlaMB0xGzAZBgNVBAMMEm1lbGxvbi5leGFtcGxlLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdRcgsO24zHIU/o5bzWGp+P3P6ALuzFHpTx
tE8jiAWI2OQ0X7gczKsq1W1/ADlYnW0nghpluDh8ZqmIJxZDm2OO5nsKlnpct6Sr
rc4auSBnE2bwv4CO9ES/vyJHgzJzjHrJs3UvBCdX6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0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X6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=&lt;/ds:X509Certificate&gt;
&lt;/ds:X509Data&gt;
&lt;/ds:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://mellon.example.com/mellon/logout" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://mellon.example.com/mellon/postResponse" /&gt;
&lt;AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://mellon.example.com/mellon/artifactResponse" /&gt;
&lt;AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://mellon.example.com/mellon/paosResponse" /&gt;
&lt;/SPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
MellonSPPrivateKeyFile (sp_private_key_file):
pathname: "/etc/httpd/saml2/demo.key"
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHUXILDtuMxyFP
6OW81hqfj9z+gC7sxR6U8bRPI4gFiNjkNF+4HMyrKtVtfwA5WJ1tJ4IaZbg4fGap
iCcWQ5tjjuZ7CpZ6XLekq63OGrkgZxNm8L+AjvREv78iR4Myc4x6ybN1LwQnV+oD
F0i9SAEPnfJCaCA+1+DC3RKy7+xtK3SVimUWwAHmkNU6N0wCVSNYn1KgnxBSCPTx
2DifbyRl21SiokCfLSnktE++WBzRzldSxzMrkSfFoS7/uT232tbdw2NsJmHGLRGk
myBrEC6BVhQ746NM1cLDtrOots7bNfZ3yfb3W1tpoKVOhM2se3OTKdidAQsaGlVu
7QIhBqinAgMBAAECggEBAJtU662WfJ9vqJRgCnpp2QG02iM0vl0jGbw1ybFLHXxC
s9TUxCv1tcNHdGEK8p++YaFpgskTsMfEmzVPuDZvpa+m9BO7op3ll/CrIp5W0SNh
cQtuX6/OuKrDTC9oz+QHjNk8S7DtXS1UJDkYckWg0cLb8qqx/z86eh0isKnmtLg2
H1+6L6mB9fcZldkcrU+kXT+dcDX85skMZAeBsrG4yaoX26AzVl8lEl2rJAQvpxj8
5wGBC4riWY6TzMYiCjcS5JfZIlbhcZe61ej3A48NVBSKCP1XKo0xbKuOHIQuMeeW
wSaboBwRzJ9JdTXlq5UWfLvmjXDc/HCwk/N7cj021uECgYEA5KkQr3cSKrMIkYoO
H0Vnkw1kYYGUjtTL00Nfdkv7uGMF122nyt1ND0gpdS0jgNx3LSEam/gY35UWEjGH
i8DGD04k8pvKDUsl8cuYPcC3oce1lLCGAnw+aHPC5wtA829CLOLtBfxXIhVAI0tp
ECosD/A63/m1LC19XolOd10/PC8CgYEA3yZChEYZupDGJFZltiy0ZgUarvD2Ss4N
QiRVR+CmpBrOKZdD8q6uUuqWQN9Rw7kXm8LxAPYwiIDVjxjYALF+j7/9Q1oZyKuv
eHJdMe4eRUeqeaIKbxnFfKwGZ5rj97jwPrkUCxio75KZhpOcDHMSgBCBtzW0XIZl
gTeQYOshZQkCgYB5TK6LRnEesabj/gaL1DejrMEJcMIsGvqdceocSSaZo/4fUA5o
8YjFiJRlkrJ403ttN1h0UOJxCReSQzASlQr8Z4n2IWrILotMf6Kdb7R6YAUVgac1
fk9k/bPw+OlVujmyshbmy/w1GmzRzFlJt/Vz5w50bnULoH4XPmOfspmvBQKBgBcJ
rihVzGY0eCBcQxfxuZYmxMB25BaI+1luwtcu3EVo9wvYMA2n9xtcWLLN23UncMaF
87ezswMEugeR+wrnSDezDISdkrfi8bSvqetzt/BTG8h+8DDUKk1avTaJCSwUDcmL
9gPHQfmp2uvH5X5riudpzNqLUtmSjnwurlszKzlxAoGAR8STlDJhNph+p3cF8k25
ydT1kypxnjzVG8CAV5/h3dUmc7j7gyV8NlWZfWacxMZWOBsrdVh0zhMNUPiLJaGd
I1isOkmiN9JFYMMhHSnhPnTCIjmu6uBLxf8wotHAvzWOJPV7lUZbw21KIN3DS79F
sGZ2QzGYn4inHG4UHClhZxU=
-----END PRIVATE KEY-----
MellonSPCertFile (sp_cert_file):
pathname: "/etc/httpd/saml2/demo.cert"
-----BEGIN CERTIFICATE-----
MIIDDTCCAfWgAwIBAgIJALnqrR7yvGH5MA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV
BAMMEm1lbGxvbi5leGFtcGxlLmNvbTAeFw0xNzA4MjgxNTExNDlaFw0yMjA4Mjcx
NTExNDlaMB0xGzAZBgNVBAMMEm1lbGxvbi5leGFtcGxlLmNvbTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdRcgsO24zHIU/o5bzWGp+P3P6ALuzFHpTx
tE8jiAWI2OQ0X7gczKsq1W1/ADlYnW0nghpluDh8ZqmIJxZDm2OO5nsKlnpct6Sr
rc4auSBnE2bwv4CO9ES/vyJHgzJzjHrJs3UvBCdX6gMXSL1IAQ+d8kJoID7X4MLd
ErLv7G0rdJWKZRbAAeaQ1To3TAJVI1ifUqCfEFII9PHYOJ9vJGXbVKKiQJ8tKeS0
T75YHNHOV1LHMyuRJ8WhLv+5Pbfa1t3DY2wmYcYtEaSbIGsQLoFWFDvjo0zVwsO2
s6i2zts19nfJ9vdbW2mgpU6Ezax7c5Mp2J0BCxoaVW7tAiEGqKcCAwEAAaNQME4w
HQYDVR0OBBYEFDBbq0pjLeMFPcBt7A++c90lSM5vMB8GA1UdIwQYMBaAFDBbq0pj
LeMFPcBt7A++c90lSM5vMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
AFiIxqhW37Td/rD77N648feciigEk/GW4zsqxdx9MspnvSTfr0/lPPOaVhd/UGAw
g+DwGOmqfisvl44wg07y+4T0NTDzvgkrT0ON5hyEBucFhSjPN+lhwWaH422URwUL
cKTqkrnAk4Er4bSi1GhsV/2/Xv2ZYyJCcUeiwWQ2fEZXp4ke3IZPN0nYlajKzBTd
Bv9YlynXKuO1hxBYDWQrrjpp1UZRKjJD2nLUsTi8oFuLhB/RwUMqXZ0nFuNoOkDQ
XotXjsiL1KtqNW1k/oVtLwNP0trqqh9npWV+R3pDTckxIHQhOvs5VqQZANViH6mp
YK53b9Bhr0TpIOKetFY68kQ=
-----END CERTIFICATE-----
MellonIdPPublicKeyFile (idp_public_key_file):
file_data: NULL
MellonIdPCAFile (idp_ca_file):
file_data: NULL
MellonIdPMetadataFile (idp_metadata): 1 items
[ 0] Metadata
pathname: "/etc/httpd/saml2/demo_keycloak_ipa_idp_metadata.xml"
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ 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.
--&gt;
&lt;EntitiesDescriptor Name="urn:keycloak" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;EntityDescriptor entityID="https://rhsso.example.com:8443/auth/realms/ipa"&gt;
&lt;IDPSSODescriptor WantAuthnRequestsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"&gt;
&lt;KeyDescriptor use="signing"&gt;
&lt;dsig:KeyInfo&gt;
&lt;dsig:KeyName&gt;R2OGk9W0luNm_NtZbURWOrPlvFzSTDMimCVK5N1Mj5U&lt;/dsig:KeyName&gt;
&lt;dsig:X509Data&gt;
&lt;dsig:X509Certificate&gt;MIIClTCCAX0CBgFeFdE9pDANBgkqhkiG9w0BAQsFADAOMQwwCgYDVQQDDANpcGEwHhcNMTcwODI0MTk1NDQ3WhcNMjcwODI0MTk1NjI3WjAOMQwwCgYDVQQDDANpcGEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgIPeag+JJmhtAkIGBwUT/req+jKC6c0Vl1Ngtzbcd07CP9mq1DomBkjuWl59J2urlEfrV4yT8avia0eYE6Dm/TqC74SHt3TVtiUliynAh/z2JvFlLb/EbGePSKrMnuNV8rV75YGcyE12vBRooUPx3hGaygsfaSOg+BijDuCSpbVdWSdVx9VecsWJfxSochOZUj6yvm/qTb8Ptl0x/o7/b/16GgjFRIKSFrdk8pVtMn1wCzpQQoGVHZmp1jrppGcp8KXIK54q7b4pPiTzlW6xhBgrmW2RtWQesCmN8ga1CVeBZKLsaH7argwGH5Ttz31iensqUO0degFu6nwCltgTVAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFx8dl6RDle65q3IHIiGaL5fbJK5HxQiMXpk4N5riWQTP4g6xoTNAG4OFFUd4uRxt2ovdEdkbzhEy2lV4x626QdEfK5V9QKppupsTxTGA/4NMW9QCocAvFSpmYErmJIhfy6zzELoBK4Dpfcc3u1peHx2686msx6ExARF116d+5Xaps1dmPPy3yb2cCKzKbLhieqv+aLLrwz657ERUc4OnqEMEmmHFhHvPI7LRlS4AQ1/s1QlKcM9yqcu8WN3yKM/kuvZtZ0YTCSIl9W1b+I5v8wNoVFB22s7rfxs3DfJFaIImaTmRzaDX0MXgibEckrkigpO+anKe9B9z8CJdtlUHco=&lt;/dsig:X509Certificate&gt;
&lt;/dsig:X509Data&gt;
&lt;/dsig:KeyInfo&gt;
&lt;/KeyDescriptor&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDFormat&gt;
&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&lt;/NameIDFormat&gt;
&lt;SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;SingleSignOnService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://rhsso.example.com:8443/auth/realms/ipa/protocol/saml" /&gt;
&lt;/IDPSSODescriptor&gt;
&lt;/EntityDescriptor&gt;
&lt;/EntitiesDescriptor&gt;
[ 0] Chain File
file_data: NULL
MellonIdPIgnore (idp_ignore):
MellonSPentityId (sp_entity_id): (null)
MellonOrganizationName (sp_org_name): 0 items
MellonOrganizationDisplayName (sp_org_display_name): 0 items
MellonOrganizationURL (sp_org_url): 0 items
MellonSessionLength (session_length): -1
MellonNoCookieErrorPage (no_cookie_error_page): (null)
MellonNoSuccessErrorPage (no_success_error_page): (null)
MellonDefaultLoginPath (login_path): /
MellonDiscoveryURL (discovery_url): (null)
MellonProbeDiscoveryTimeout (probe_discovery_timeout): -1
MellonProbeDiscoveryIdP (probe_discovery_idp): 0 items
MellonAuthnContextClassRef (authn_context_class_ref): 0 items
MellonSubjectConfirmationDataAddressCheck (subject_confirmation_data_address_check): On
MellonDoNotVerifyLogoutSignature (do_not_verify_logout_signature): 0 items
MellonPostReplay (post_replay): On
MellonECPSendIDPList (ecp_send_idplist): On
enter function am_auth_mellon_user
searching for session with key 9cf3ebac4e542827e276dc064ce8c4e4 (session) ... found.
Session Cache Entry
key: 9cf3ebac4e542827e276dc064ce8c4e4
name_id: G-e292fc24-74d9-4979-9f81-2c26d85174de
expires: 2017-08-31T16:15:23Z
access: 2017-08-30T16:15:23Z
logged_in: True
am_check_permissions succeeds
am_auth_mellon_user am_enable_info, have valid session
=== Response ===
Status: 404 Not Found(404)
user: G-e292fc24-74d9-4979-9f81-2c26d85174de auth_type=Mellon
Response Headers:
Cache-Control: private, max-age=0, must-revalidate
Content-Length: 209
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
Response Error Headers:
Environment:
UNIQUE_ID: WabknGfzHRm5EyVgPZnqEgAAAAU
MELLON_NAME_ID: G-e292fc24-74d9-4979-9f81-2c26d85174de
MELLON_NAME_ID_0: G-e292fc24-74d9-4979-9f81-2c26d85174de
MELLON_groups: ipausers
MELLON_groups_0: ipausers
MELLON_groups_1: openstack-users
MELLON_Role: view-profile
MELLON_Role_0: view-profile
MELLON_Role_1: uma_authorization
MELLON_Role_2: manage-account
MELLON_IDP: https://rhsso.example.com:8443/auth/realms/ipa
MELLON_IDP_0: https://rhsso.example.com:8443/auth/realms/ipa
HTTPS: on
SSL_TLS_SNI: mellon.example.com</pre>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footnotes">
<hr>
<div class="footnote" id="_footnote_1">
<a href="#_footnoteref_1">1</a>. When you are protecting just one location with Mellon there isn&#8217;t much added value in splitting the configuration directives. But when you need to protect many distinct locations, it&#8217;s repetitive and error prone to cut and paste common values in each <code>&lt;Location&gt;</code> block. It makes maintaining the configuration that much more difficult because you will need to edit each and every <code>&lt;Location&gt;</code> directive to change something like the name of a metadata file. This is why Mellon configuration often groups common values in a location that can be shared by all descendants. Using the <code>/</code> <em>root</em> location is the most obvious example but the same idea can be applied to complex trees.
</div>
</div>
<div id="footer">
<div id="footer-text">
Version 1.3<br>
Last updated 2018-07-27 16:01:36 EDT
</div>
</div>
</body>
</html>