Add state to oidc uri#1621
Conversation
Should fix #1619 - Cannot compile offline to test. I am not familiar with SBT.
|
Hi @Helvio88 - thanks for looking into this. I think tihs is the corect approach. The If you like to test it offline, you don't need to really know sbt for that. Here are some tips, basically you need to install sbt, node and elm and start into sbt and then run |
|
I was able to use Also, this is some quick information right from the source about the |
|
In short, you send a state string and then receive it back from the identity provider. It's another thing to match. If it doesn't match, then it's an invalid request. Most Identity Providers require it, but frequently a static state is sent. Could be an Env Var. I simply used the OIDC name - which should be enough. |
Yes, but we don't check it or do anything with it, so it feels a bit useless. I don't think it really helps in mitigating CSRF attacks then. This is more circumventing the IPs requirement of a state parameter. (I'm not really opposed to it :)). Maybe another variant would be to use a random signed string and check the signature… I would prefer not to maintain state on the server ….
You can create a directory |
Thank you - the link is helpful! |
Thank you! Output said it picked up the conf file. |
|
Ah!
|
Changing to open made it work! But I wonder if it's the right way to do OIDC lol |
Ah… it indeed sounds a bit weird! Does it also work with mode=invite? It might be because it needs to create a new account with the data from the IP. I need to look, forgot all about it. Regarding the |
|
Maybe a env or static string should be used instead, because some IPs need at least 8 characters. Leaving it the way I did would cause issues if people name it other than "docspell" or "authelia" which have 8 chars lol Or go all in with CSRF mitigation with a random cookie. But I really don't think it's needed since it's already behind an IP. Also, |
|
BTW what I meant that it doesn't work with |
|
I think somewhere in |
|
Thank you for digging into this! I think this is a ordinary bug. It should work regardless of signup mode. It's two bugs now: the missing |
Should fix #1619 - Cannot compile offline to test. I am not familiar with SBT.