Implement passport-github strategy in hyperledger composer - hyperledger

I am implementing multi user composer rest server using passport-github.
All is working fine. But I've 2 different angular app running on 2 different ports.
Same as this one but I want 2 client application.So basicaly, my successRedirect for COMPOSER_PROVIDERS should be different for both the angular app.
Such that successRedirect should be redirected to the same calling port. How can I achieve this?

Related

How do I connect the different containers in a microservices architecture with an api gateway?

We are working on a microservice oriented architecture. As of now, we have implemented the several services using docker and spin them up using docker-compose. our architecture looks something like this:
Usermanagement and tasks services are express.js servers that communicate with their respective mongodb (everything works fine on themselves). usermanagement service keeps the details of the users while tasks keeps track of tasks of the users.
Our challenge is figuring how to bring them together, how do we configure the routes? How does the frontend and backend communicate behind the gateway? (How do the services communicate with each other?) How does the client get logged in through the usermanagent downstream then authorized to access tasks? Does kong authorization plugin depend on usermanagement authorization token?
kindly advice

How to orchestrate different version of apps in Docker or Kubernetes

I have three versions of the app that I need to serve to the user based on selection (for now assume it's a drop-down)
I have 3 containers running v1, v2, v3 of the app.
How do we route the app to the right container in Kubernetes based on the selection? How do I separate my versions?
Create 3 different Kubernetes deployments with pods using containers v1, v2, and v3 respectively. Also, create 3 Kubernetes services to forward traffic to those 3 deployments.
Actually, this is a classical problem. Imagine you created any application which is providing any service for clients. Imagine your clients communicate with your service via client app using your API. The first version of your application was having API with 1 supported method. Imagine, your application went viral and you decided to improve functionality of you application by adding 2 newly created methods to your API. So you had decided to upgrade you API and client app. New clients can use 3 methods and everything is ok, but what about clients, who use old version of the client app? That's why most part of the API's have got a versioning, e.g v1/v2/v3. Old clients communicate via APIv1 and new clients via APIv2 and so on.
Since you have got a different versions of the same app it is clear, that some newer versions of the app support more functionality. Maybe it will be better to handle request via web server like Nginx or something else (including Ingress) by redirecting them depending on URL. For example, if URL has got v1, then route it to the app's deployment with version 1 and so on.
I'm not sure this is your case, but I hope it turns out to be useful.

Breaking up existing rails application into UI and API

We have an already working rails application but the UI and API is built into 1 application. The problem we are having is that when anything happens to the app for example if it goes down, it affects API and GUI. 3rd party systems can't communicate with the API. We are trying to prevent this. These are my options so far:
option 1: deploy the same application to 2 different ports using puma and unicorn
option 2: have 2 different repos for API and GUI and deploy them separately on the same server
Is there a better way where we can have 1 repository hosting both API and GUI and when GUI goes down, API isn't affected?
Thanks I figured it out. Keep the same codebase and deploy unto 1 server that will serve as the API and one server that will serve as the GUI and a 3rd server being the mysql server

How to make SSO among SpringBoot apps running on same Tomcat under different context?

How can one build/configure single authentication for apps built by SpringBoot and running under different contexts in Tomcat? It seems to me very common scenario, we have multiple apps that we maintain separately but they have to share the same login, so user can switch among them without authenticate to each one with the same credentials. Any idea how to make it done easily?

Domains and Multiple Platforms Uploaded to Same Server

I have both an Ionic and a Rails application. I'm currently wanting to push both apps onto the same EC2 instance. Ionic will act as a login section and several other pages. The rails application is intended to be a shopping cart and is only accessible when a user is logged in. I'm confused on a couple of points.
Am I right to believe both apps should be under different subdomains? Can I instead push both apps to two separate servers while still maintaining two separate subdomains? If two separate servers are used, can I expect sessions and localStorage to work across both applications? Thanks!
I assume that you are mixing up many things.
Domains & Subdomains
Let me explain that point with an example :
sub.example.com : first subdomain
other.example.com : second subdomain
Domains and subdomain are pointer to a server ip. Therefore, both example can point to the same EC2 instance.
The domain and subdomain shall therefore not enter into consideration into your analysis.
Webserver & Session Management
I'm not an expert and that point at all, but the magic is performed generaly here to share information & Sessions.
Common Webservers are Apache / Tomcat or even Jetty.
Some person use for session management REDIS too
LocalStorage
Correct me if I'm wrong, but localStorage can't be shared from one site to another.
Your problem resides more into this question :
What webserver am I using ?
Or : How Tomcat7 manage sessions ?
Or : Can I share session from different Webservers ?

Resources