Moonshine-IDE / Super.Human.Portal

Portal interface to show documentation for DominoVagrant and Super.Human.Installer
Other
0 stars 1 forks source link

Error Handling for XMLAuthenticationTest non-JSON Output #51

Closed JoelProminic closed 4 months ago

JoelProminic commented 7 months ago

@piotrzarzycki21 reported that he was getting an HTML response from XMLAuthenticationTest when testing on domino-49.prominic.net. I have seen this happen in two main cases:

  1. The user does not have sufficient access to call the agent. This is determined by the database ACL. Some customers might want to add additional restrictions here to lockout their end users from this admin database (which is the case for domino-49). In other cases, this may have been a mistake or oversight in the database configuration. See #41 for more discussion of the minimum user permission requirements.
  2. The agent wasn't imported properly, or there is an uncaught error in the agent. This should hopefully only matter when doing development work.

At least the first case could happen in production, so we should have some error handling. I think we should display an error like this on the home page. This could be a popup, but I think it may fit better to display this as an error in the login form (since the user could have logged in with the wrong user for the environment). However, this wouldn't make sense if an external loginURL were configured (#42), so the popup is a more universal solution.

You are logged in as an invalid user, or there is an error on the server. Please contact support if the problem persists.

JoelProminic commented 7 months ago

@piotrzarzycki21, you can test this by changing the ACL in your test database:

  1. Open SuperHumanPortal.nsf on your test server
  2. File > Application > ACL
  3. Select the Anonymous entry
  4. Change the access to "No Access"
  5. Run your test. Make sure you are logged out first with https://domino.%server%/names.nsf?logout
  6. When done, repeat steps 1-3 and change the Anonymous access back to "Depositor", with "Read public documents" and "Write public documents"
piotrzarzycki21 commented 7 months ago

@JoelProminic This has been implemented as popup error and it's ready for tests.

JoelProminic commented 4 months ago

The popup looks like this: image

I confirmed that this worked when the agent gave an error (requiring authentication) in my tests today. I also confirmed that the error did not show up when the agent returned valid XML.