OpenAS2 / OpenAs2App

OpenAS2 is a java-based implementation of the EDIINT AS2 standard. It is intended to be used as a server. It is extremely configurable and supports a wide variety of signing and encryption algorithms.
https://sourceforge.net/projects/openas2/
GNU General Public License v3.0
185 stars 136 forks source link

Unable to log in via WebUI #376

Closed csyversen closed 5 months ago

csyversen commented 6 months ago

@uhurusurfa I grabbed the latest release from sourceforge and I've got both the webui and the server up and running and they are communicating with each other (i can see the following in the openas2 logs after I make a login attempt via the web ui)

Screenshot 2024-05-21 at 3 16 25 PM

but i keep getting a 404 when using the test credentials (userID/pWd), whereas i see slightly different results when inputting a totally invalid u/pw, like so:

Screenshot 2024-05-21 at 3 18 12 PM

am i doing something wrong? am i missing a db seed step or something? I'm incredibly new to both as2 and this project, so any guidance is appreciated, thanks!

igwtech commented 6 months ago

Hi Chris, Can you provide a copy of your config.xml file to better assist you?

On Tue, May 21, 2024 at 4:20 PM Chris Syversen @.***> wrote:

@uhurusurfa https://github.com/uhurusurfa I grabbed the latest release from sourceforge and I've got both the webui and the server up and running and they are communicating with each other (i can see the following in the openas2 logs after I make a login attempt via the web ui) Screenshot.2024-05-21.at.3.16.25.PM.png (view on web) https://github.com/OpenAS2/OpenAs2App/assets/3679416/a3658427-2450-4434-b2d9-a189a239dfaf

but i keep getting a 404 when using the test credentials (userID/pWd), whereas i see slightly different results when inputting a totally invalid u/pw, like so: Screenshot.2024-05-21.at.3.18.12.PM.png (view on web) https://github.com/OpenAS2/OpenAs2App/assets/3679416/96001a8a-7201-4564-aa17-6bdc97177644

am i doing something wrong? am i missing a db seed step or something? I'm incredibly new to both as2 and this project, so any guidance is appreciated, thanks!

— Reply to this email directly, view it on GitHub https://github.com/OpenAS2/OpenAs2App/issues/376, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2QNDYS5F4RPW3FXH3IF63ZDOUBHAVCNFSM6AAAAABICJ2B5OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDSMBUHE2TGNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Javier Munoz

CEO

Greicodex Software

+58 2127629120 <+58+2127629120> @.*** www.greicodex.com Av Francisco Solano, Centro Solano Plaza, Oficina PHA, Caracas, Venezuela

csyversen commented 6 months ago

@igwtech it's long, so i created a gist: https://gist.github.com/csyversen/02578a11677ebf0d461908ce28ec24ef

the only section i changed was the RestCommandProcessor section, mostly following the steps that somebody else laid out here: https://github.com/OpenAS2/OpenAs2App/issues/320#issuecomment-1569959320

igwtech commented 6 months ago

HI Chris, I see you have configured the base Url for the Rest API as: localhost

restapi.command.processor.baseuri="http://localhost:8080"

It's a common problem since this will require that your WebUI also runs on localhost otherwise you would get all sorts of CORS issues and connection issues.

It is set as default to avoid accidentally exposing your OpenAS2 installation but since you are running inside Docker and most likely with a NAT bridge you can change this to "http://0.0.0.0:8080" to accept Rest connections over all IP addresses.

Regards, J

On Tue, May 21, 2024 at 5:02 PM Chris Syversen @.***> wrote:

@igwtech https://github.com/igwtech it's long, so i created a gist: https://gist.github.com/csyversen/02578a11677ebf0d461908ce28ec24ef

the only section i changed was the RestCommandProcessor section, mostly following the steps that somebody else laid out here: #320 (comment) https://github.com/OpenAS2/OpenAs2App/issues/320#issuecomment-1569959320

— Reply to this email directly, view it on GitHub https://github.com/OpenAS2/OpenAs2App/issues/376#issuecomment-2123436966, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2QND35AM3CCM736S463EDZDOY6JAVCNFSM6AAAAABICJ2B5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRTGQZTMOJWGY . You are receiving this because you were mentioned.Message ID: @.***>

-- Javier Munoz

CEO

Greicodex Software

+58 2127629120 <+58+2127629120> @.*** www.greicodex.com Av Francisco Solano, Centro Solano Plaza, Oficina PHA, Caracas, Venezuela

csyversen commented 6 months ago

@igwtech awesome, I'll try that in a little bit!

I had modified this line: https://gist.github.com/csyversen/02578a11677ebf0d461908ce28ec24ef#file-config-xml-L131 to be http://0.0.0.0:8443 and thought that might be an override, but I might've misunderstood the config's intent!

csyversen commented 6 months ago

@igwtech ah, no luck even after making that change. I'm still seeing the same results.

It looks like the Server app is up and accepting REST requests from the Vue app (since i'm seeing activity in the server logs when I submit the login form), but the user doesn't exist or something?

igwtech commented 6 months ago

I see. Let me see if I can reproduce it using the config.xml provided

On Wed, May 22, 2024 at 12:09 PM Chris Syversen @.***> wrote:

@igwtech https://github.com/igwtech ah, no luck even after making that change. I'm still seeing the same results.

It looks like the Server app is up and accepting REST requests from the Vue app (since i'm seeing activity in the server logs when I submit the login form), but the user doesn't exist or something?

— Reply to this email directly, view it on GitHub https://github.com/OpenAS2/OpenAs2App/issues/376#issuecomment-2125173919, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2QND5NRL7WKISLA72CAFTZDS7L7AVCNFSM6AAAAABICJ2B5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVGE3TGOJRHE . You are receiving this because you were mentioned.Message ID: @.***>

-- Javier Munoz

CEO

Greicodex Software

+58 2127629120 <+58+2127629120> @.*** www.greicodex.com Av Francisco Solano, Centro Solano Plaza, Oficina PHA, Caracas, Venezuela

badsmoke commented 5 months ago

i get a connection refused, the service does not seem to be running/listening

Hansz commented 5 months ago

What got it to work for me/us is changing the following 2 files:

docker-compose.yml

services:
  openas2:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - 4080:10080
      - 4081:10081
      - ${HOST_RESTAPI_PORT:-8443}:8080
    environment:
      - OPENAS2PROP_RESTAPI__COMMAND__PROCESOR__BASEURI="http://0.0.0.0:8080"
      - OPENAS2PROP_RESTAPI__COMMAND__PROCESOR__USERID="userID"
      - OPENAS2PROP_RESTAPI__COMMAND__PROCESOR__PASSWORD="pWd"
    tty: true
    stdin_open: true
    networks:
      - as2-network
    volumes:
      - ./config:/opt/openas2/config:rw
      - ./data:/opt/openas2/data:rw

  openas2_webui:
    build:
      context: .
      dockerfile: Dockerfile_WebUI
      args:
        - VUE_APP_RESTAPI_URL=http://openas2:${HOST_RESTAPI_PORT:-8443}/api
    ports:
      - ${HOST_WEBUI_PORT:-8080}:80
    tty: true
    stdin_open: true
    networks:
      - as2-network

networks:
  as2-network:
    name: as2-network

config.xml

restapi.command.processor.baseuri="http://0.0.0.0:8080"
uhurusurfa commented 5 months ago

Closing as solution appears to have been found.

csyversen commented 5 months ago

@uhurusurfa fwiw i never got this working, but decided to just use openas2 headless instead

igwtech commented 5 months ago

hi Chris, I was unable to replicate the issue you are facing. Please make sure that:

a) There is no blocking on your server by either a firewall, network or OS configuration b) There is no blocking on your client (browser) due to CORS, SSL limitations or similar.

Regards, J

On Wed, Jun 5, 2024 at 10:02 AM Chris Syversen @.***> wrote:

@uhurusurfa https://github.com/uhurusurfa fwiw i never got this working, but decided to just use openas2 headless instead

— Reply to this email directly, view it on GitHub https://github.com/OpenAS2/OpenAs2App/issues/376#issuecomment-2150070227, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2QND2W2FCB55GKJD6DNZ3ZF4LBDAVCNFSM6AAAAABICJ2B5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJQGA3TAMRSG4 . You are receiving this because you were mentioned.Message ID: @.***>

-- Javier Munoz

CEO

Greicodex Software

+58 2127629120 <+58+2127629120> @.*** www.greicodex.com Av Francisco Solano, Centro Solano Plaza, Oficina PHA, Caracas, Venezuela