Yes. This is one part of the spec that it is very convenient to
violate. I had some plans to add a "standards compliant relaystate"
option, but unfortunately haven't gotten around to it.
> For the sake of testing, I tried to give relaystate a dummy value by
> editing authnsources.php but had no luck:
>
> 'default-sp' => array(
> 'saml:SP',
> 'relayState' => 'https://sp.example.org/welcome.php',
>
>
> What can I do to shorten the relaystate string?
What version of simpleSAMLphp are you using? I belive it was changed
to use a shorter RelayState relatively recently.
Regards,
Olav Morken
UNINETT / Feide
In that case, it will already use a short URL if it is available.
That means that if you start your authentication from
'https://sp.example.org/welcome.php', the RelayState will be set to
that URL.
You can also do something like:
$as = new SimpleSAML_Auth_Simple('default-sp');
$as->login(array(
'ReturnTo' => 'https://sp.example.org/welcome.php',
));
Unfortunately, there is no code that attempts to keep the RelayState
parameter below 80 bytes, so when the URL becomes longer, we will
violate the spec.
There is no requirement for relaystate to be an (or the original) URL,
e.g. the SP might want to keep the IdP from learning the specific URL
the subject was trying to access.
-peter