Closed bilak closed 8 years ago
I'm happy that project is useful for something else!
About
How to work with csrf while angular application will also need csrf token and I bet that the token generated by gateway wont work unless I somehow hack to GUI application.
If I understand well the problem is that Gateway
is holding and managing CSRF
token, so how Gui-service
can access to the token in order to transfer it to client?
Any cases I can't answer you today. I will try to think about asap.
PS: I never used Angular2
, could you please describe me how Angular2
store token/retrieve (inside Header, Cookie, HTML tags)?
What about failower in this situation (with GUI). What if gateway goes down and I wold like to redirect user to second node/cluster? Is there a simple way how to do that? I was thinking about spring session support to store session to redis/jdbc, but I'm not sure if this is right direction.
Yes problem is same for Gateway
and UAA
, if you want to provide failover mechanism you need to share state (here session). So yes storing session on shared dedicated storage like Redis
is a good way to do.
However for Gateway
another direction is to improve current architecture to transform stateful Gateway
to stateless Gateway
. Today I'm using JWT
to store identity on client side, session is only used by CSRF
...
@kakawait if you look here you can find something simillar to my current configuration. One thing I have to change is to add a gateway. Project is configured to store oauth tokens inside jdbc. I'll try to change it today and maybe we can find the solution on this simple project.
About CSRF
you may need to create post
ZuulFilter
that add X-CSRF-TOKEN
header on every response.
@bilak Please create a branch for drafting Gateway
and we can try to work on it after
@kakawait here is the branch.
There are following issues:
If you need something more, just let me know.
Thanks
I don't think I will have time to work on it this week but I will check that asap
Hi, Thanks for this nice project, It gave me a lot to setup my applications. Now I'm thinking about adding next module and it should be GUI (based on angular2).
I have some questions and would like to discuss it.
Thanks in advance