E9.2 Getting E1 environment and user authentication information to pass to an external application

jgagnon

Active Member
I have managed to achieve a fair amount of success in setting up the following:
  • Creating a Java-based web application (using Spring Boot and Vaadin) that displays a GUI to receive user input. When the GUI is "submitted" it makes a REST call to an E1 orchestration that receives the input data and executes actions that result in changes in E1. Why am I doing this? Because there appears to be no way to prompt the user for input data that is not available from an E1 application.
  • Making the Java application available in an E1 CAFE1 "pane" associated with an E1 application. CAFE1 allows for displaying an E1 application or specifying a URL. When the Java program is run, it is available as a web application accessible via a URL.
It actually appears to work as designed - with a very important caveat: A lot of the information required by the orchestration is currently hard-coded in the Java code - this is why it works. Fine for experimentation and proof of concept, but not a viable solution for the real world.

So, there's the problem: I need to be able to pass information to the Java program, which is then passed along in the REST call to the orchestration. I'm not seeing a way to do it. I'm asking the community if they know if there is a way to do this.

Here is the information that I need to be able to obtain:
  • The AIS server address and port. E.g. http://server:port. This is part of the REST call URL.
  • The orchestrator REST path. E.g. /jderest/orchestrator. This is part of the REST call URL.
  • The orchestration name. This is part of the REST call URL.
  • The JDE user role. E.g. *ALL. The AIS server expects this in the REST request.
  • The JDE environment. E.g. JPD920. The AIS server expects this in the REST request.
  • The user name and password for JDE user authentication. This is also expected in the REST request.
All of these items come together when I make the REST call to invoke the E1 orchestration. If any are missing (or incorrect), the call will fail.

I'm so close on this, and yet so far away, because I cannot figure out how to do this last piece.
 
You must be providing either basic or token authentication to get this working at all? Role and environment can be orchestration inputs in the json body
 
You must be providing either basic or token authentication to get this working at all? Role and environment can be orchestration inputs in the json body
Yes, basic authentication at the moment. Where can I obtain these values? I'm launching the java app from a CAFE1 pane - I need to pass all of these values to it, but I don't know how to get them (of if they are even accessible).
 
I have attached an image of how the various components relate to each other and where they are running from.
The problem is getting E1 user session-specific information (user name and password, login role and E1 environment) from E1 to the external Java application. The java app doesn't use it other than to set up the appropriate REST call to invoke the orchestration.
 

Attachments

  • flow1.png
    flow1.png
    23.8 KB · Views: 37
Last edited:
Yes, basic authentication at the moment. Where can I obtain these values? I'm launching the java app from a CAFE1 pane - I need to pass all of these values to it, but I don't know how to get them (of if they are even accessible).

You cannot retrieve the JDE password clear text. That was a serious security flaw they cleared up back in E7333 days...
 
You cannot retrieve the JDE password clear text. That was a serious security flaw they cleared up back in E7333 days...
That makes sense. Wouldn't it be passed as an encoded value? The problem is I don't know where/how to get any of these values to be able to pass it to the Java application.
 
Back
Top