Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[experimental-login] MIService in local development environment #55

Closed
hldarshana opened this issue Jun 29, 2020 · 2 comments
Closed

[experimental-login] MIService in local development environment #55

hldarshana opened this issue Jun 29, 2020 · 2 comments
Labels
question Further information is requested

Comments

@hldarshana
Copy link

Hi,

Can we use new experimental-login feature to test MIService in local development environment? If so, is there any example (including how to set ionApiConfig and it's path) to refer?

Thank You

@hldarshana hldarshana added the question Further information is requested label Jun 29, 2020
@anhallbe
Copy link
Collaborator

anhallbe commented Jun 30, 2020

Yes! You can use the experimental-login login command since version 3 4. More detailed docs are on their way.

This is a new (experimental) feature. So please try it out, and all feedback/issue reports are appreciated.

In short, the steps are:

  1. Configure and download an .ionapi file (see below)
  2. Run odin login ./path/to/downloaded-file.ionapi
    2.1 Add the --update-config or -c flag to the above command to automatically update odin.json. So odin login -c .....
  3. Run odin serve --multi-tenant --ion-api

Now, requests to e.g /m3api-rest will be redirected to the configured ION API endpoint in the development proxy.

You can also configure it so that requests will be proxied directly to M3, without the ION API in between. This may be necessary if for instance the M3 API you are using is not accessible through ION API:

  1. See step 1 above. The ION API config is still needed for login.
  2. Run odin login --update-config --m3 https://url.to.m3 ./path/to/downloaded-file.ionapi
  3. Run odin serve --multi-tenant

See:
odin-login

Configuring ION API

You should look into the ION API documentation for more detailed instructions on what to do (and what NOT to do). Make sure you are aware of the security implications of authorizing apps like this. But the following is one way to do it:

  1. Go to the InforOS portal, and open the ION API application:
    1-open-ionapi
  2. Go to the "Authorized Apps" section and "Add new app":
    2-authorized-apps
  3. Configure it something like this, and "Save" it:
    3-config
  4. Download the .ionapi file:
    4-download-credentials

@anhallbe anhallbe changed the title MIService in local development environment [experimental-login] MIService in local development environment Jul 1, 2020
@anhallbe anhallbe pinned this issue Jul 1, 2020
@swuendri
Copy link
Contributor

Are there any open points @hldarshana here? If not close the issue please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants