orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
515 stars 221 forks source link

Improve handling of credentials for service calls #2321

Open ebruchez opened 9 years ago

ebruchez commented 9 years ago

UPDATE 2022-03-28 @avernet: See @ebruchez's 2021-08-02 comment for concrete use case.

UPDATE 2022-03-28: RESOLUTION: We will change the FormRunnerAuthFilter not to filter the Orbeon-Username, Orbeon-Roles, and Orbeon-Group for requests to /fr/service/*. This way, services callers will be able to make queries "on behalf of someone". Also, customers can set up their authorizer to altogether reject requests with those headers set, of check that the values of the headers are allowed depending on some custom logic.

See #2275 for the a concrete issue.

Questions:

ebruchez commented 3 years ago

+1 from customer

ebruchez commented 3 years ago

Comment from duplicate #1872 which I just closed:

The Form Runner persistence API needs to know about the current user (username, roles, and group) to return meaningful results. For this information to be available to the API when it is called by a 3rd-party application, currently Orbeon Forms needs to be deployed twice:

  1. Once setup with FORM-based authentication (to be accessed by end-users with a browser).
  2. Once with BASIC authentication (to be accessed by 3rd-party applications).

We would like to avoid the need to deploy Orbeon Forms twice. One way to do this would be to:

  1. Use a single war, disabling authentication for the services (this is already what is being done by default).
  2. In the PFC, when calling the authorization service, pass the list of roles in a header.
  3. In our simple authorizer, use that list of roles, and set the Orbeon-Username, Orbeon-Group, and Orbeon-Roles in the response.
  4. In the PFC, when an authorization service returns those headers, use their value and take that to the be the authenticated user.
ebruchez commented 3 years ago

Do we have a workaround for this, or not? If not, then we need to implement this quickly.

Here is a concrete scenario causing problems:

avernet commented 2 years ago

+1 from customer

ebruchez commented 2 years ago
ebruchez commented 2 years ago

Documented

ebruchez commented 2 years ago

Reopening until we have properly tested.