mks
mks

Reputation: 77

share data between different domains

I have two different services running on two different machine and thus url for both services will be different.

first user will come to first service which is front end and when some button clicked on this service then user will be redirected to the other frontend services which running on different machine with some dynamic value. My question is how we can share data between these two different domain services without sending data as query string.

Upvotes: 2

Views: 4414

Answers (2)

Paul
Paul

Reputation: 36339

The other commenters have provided examples of how you can store data on the client (localStorage and sessionStorage) and one way to send it along with a request to a server (cookies).

However, you say that you're trying to share an RSA token which tells me you don't really understand how RSA is supposed to work. The short answer is, you don't share the RSA token at all. At least not the way you're thinking about it. Instead, you're authenticating against a server that knows how to handle the 2FA provided by the token and pin combination for a user, this is usually just a POST request sent to that server like any other login. That server will then respond with some kind of other ticket / token / session cookie / whatever that subsequent requests to other services in your infrastructure will include with them. Depending on what mechanism you want to use, the details of what that service does to validate the claim will change, but that's the general pattern.

I'd strongly recommend studying up on the technologies you're working with so that you don't accidentally compromise the security they offer. Here's a starting point on RSA: https://community.rsa.com/videos/26526

Upvotes: 1

Keijack
Keijack

Reputation: 868

If these two service share the same root domain, say a.mysite.com and b.mysite.com, you could try to store the date in cookies making it's path to mysite.com

Upvotes: 2

Related Questions