Giter VIP home page Giter VIP logo

bankid-saml-idp's People

Contributors

felix-hellman avatar martin-lindstrom avatar oestrogen avatar theseal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bankid-saml-idp's Issues

Support for distributed sessions

We need to be able to distribute session data. We provide Redis-implementations that may be "turned on" using configuration settings.

Document health-endpoint

For each type of health-check, document what operations should do in case or errors/warnings.

Handle cancel from BankId Application

Current implementation only respects the Cancel button on the web application. When a user cancels via the BankId Application the server returns a 500 response since it does not stop after the cancel status has been reached.

This must be handled in both frontend and backend.

Remove unused templates

There are some Thymeleaf-templates left under src/main/resources/templates. These should be removed.

Allocate place for link to accessibility report

Digg, and other "myndigheter", will most likely have the possibility to add a link at the bottom of the page pointing at the accessibility report for the site. Let's make a configurable solution where we can give a link to a report under bankid.ui.*.

Define, implement and document Audit logging events

We should provide audit events for:

  • received authentication requests (may be done within the SAML-core lib),
  • bad authentication requests (may be done within the SAML-core lib),
  • initiated BankID-operations,
  • successful BankID-operations,
  • failed or cancelled BankID-operations,
  • SAML-responses sent back to the SP (may be done within the SAML-core lib)

more?

Add configuration for IdP message source

We need to add the configuration below in order to be able to read the texts used in SAML error responses.

Also. Add a Swedish: idp-error-messages file.

spring:
  messages:
    basename: messages,idp-errors/idp-error-messages

Do not hardwire context path in vue frontend

As mentioned in #19 the context path is hardwired for redirects and api calls in the vue frontend even though it is set in the file bankid-saml-idp/bankid-idp/bankid-idp-frontend/package.json

    "build": "vite build --base=/bankid/idp",

The frontend should be able to resolve the context path from this configuration.

Prepare for Spring Boot overlay

Organizations wishing to extend, or change, the backend with additional features should be able to do this by providing their own Spring Boot application that uses/has a dependency to our backend.

  • Prepare POM for this
  • Document how it is done

Do not construct message on each poll

The current implementation of getting the message to be displayed in the app is constructed upon each poll which is not necessary. Either set the message once upon init or lazy-load it once and set it in context.

Protect against sign messages in HTML format

According to Sweden Connect specs a sign message may be in HTML. This is not supported by BankID and we should reply with an error in these cases.

Also look into whether we should "clean" markdown messages before sending them to BankID.

Make sure that error view handling is correct

If an error occurs during the SAML processing, the IdP will attempt to send a error SAML response back. This will not be possible in all cases, for example if the SP (RP) is unknown, or if the signature validation fails. In those cases the user should end up on an error page. Check how implement this in backend/frontend communication.

Configure display text

Currently, there is no way of sending a desired display text in the case authentication using SAML. There is an issue to introduce this kind of extension (swedenconnect/technical-framework#195), but that will be optional. Therefore, we need a way of statically configure a text to be displayed during BankID authentication.

There should be one general default text and each RP configuration should have the possibility to override this default.

Actuator endpoints

Define actuator endpoints:

  • health: Verifies that the system is up
    • Valid SAML metadata for all the configured clients
    • RP-certificate for all configured clients are still valid (warn when about to expire)
    • BankID API server is up
  • statistics
  • audit events (see separate issue about auditlogging)
  • more ...

Prepare frontend for style and message overrides

  • Make sure CSS is overridable
  • Use CSS variables for the most common things organizations might want to change
  • Add slots for messages to be inserted in
  • Make some strings overridable, like the copyright notice?

Implement rejection of multiple non-idempotent calls.

In some browser/device combination the browser will refresh the webpage upon returning to the browser from the BankId application. If a poll is actively being processed then another one can be executed simultaneously, see diagram.

Racecondition

sequenceDiagram
    User->>BankIdIDP: Poll [1];
    User->>User: Enter Pin and Accept;
    User->>User: Browser Refresh;
    Note right of User: We lose track of [1] here <br> since it belongs to the old browser context <br> but it continues to be executed server side
    BankIdIDP ->> BankIdApi: /collect [1];
    User->>BankIdIDP: Poll [2];
    Note right of BankIdIDP: The initial poll has not been completed <br> Thus collect will be attempted again
    BankIdApi ->> BankIdIDP: OK {Complete} [1];
    Note right of BankIdApi: Once an order has been completed <br> it can not be collected again

    BankIdIDP ->> BankIdApi: /collect [2];
    BankIdApi ->> BankIdIDP: ERROR {No such Order} [2];
    BankIdIDP ->> User: ERROR {No such Order} [2];
    

This problem can be fixed by not allowing multiple non-idempotent calls by using distributed locks.
E.g. Redisson https://github.com/redisson/redisson/wiki/8.-Distributed-locks-and-synchronizers

If the same user sends more than one of the same request in parallel the api shall respond with a 429 and ask the client (javascript) to try again later by using a retry-after header.

https://www.rfc-editor.org/rfc/rfc6585#section-4

A description of the error shall be given in JSON

Configure default sign message text

According to the Swedish eID Framework a sign service may send an AuthnRequest that does not include a SignMessage extension. In these cases we must still invoke the BankID Signing, but need a text to sign and display. Let's introduce a default sign text to use (possibly per RP).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.