Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log and report login errors #219

Merged
merged 2 commits into from
Dec 4, 2024
Merged

Conversation

nvdk
Copy link
Member

@nvdk nvdk commented Dec 4, 2024

Overview

Sets up mu-auth to allow writing error reports (previously not configured) from the login service. This makes the errors available in the dashboard

NOTE: currently the login service only logs an error if a admin unit is not found, but this could be expanded on in the service itself

image

Setup

How to test/reproduce

I tested by adding an error report manually:


    PREFIX rlog: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#>
    PREFIX dct: <http://purl.org/dc/terms/>
    PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>

    INSERT DATA {
       GRAPH <http://mu.semte.ch/graphs/login-error-logs> {
          <http://data.lblod.info/id/log-entries/621eba20-b20b-11ef-b76b-a3c6602d9e81> a rlog:Entry ;
              <http://mu.semte.ch/vocabularies/core/uuid> "621eba20-b20b-11ef-b76b-a3c6602d9e81" ;
              dct:source <http://data.lblod.info/id/log-sources/c7806563-25a4-46c8-9be2-a0cdf0db1f98> ;
              rlog:className <http://data.lblod.info/class-names/no-bestuurseenheid-for-role> ;
  rlog:message "User is not allowed to login. No bestuurseenheid found for roles [\"GelinktNotuleren-publiceerder:1010784540\",\"GelinktNotuleren-schrijver:1010784540\",\"GelinktNotuleren-ondertekenaar:1010784540\",\"GelinktNotuleren-lezer:1010784540\"]" ;
              rlog:date "2024-12-04T06:45:43.000Z"^^xsd:dateTime ;
              rlog:level <http://data.lblod.info/id/log-levels/3af9ebe1-e6a8-495c-a392-16ced1f38ef1> ;
        ext:specificInformation """{"sessionUri":"http://mu.semte.ch/sessions/356c7ecc-b20b-11ef-a3e8-0242ac1d0002","kbonummer":"1010784540"}""" .


        }
    }

I did not verify if the login service could write the error log, but I don't see why it shouldn't. Proper testing would require setting up a local instance, remove an admin unit (or just it's identifier) and logging in with acm/idm for that admin unit.

Challenges/uncertainties

Checks PR readiness

  • UI: works on smaller screen sizes
  • UI: feedback for any loading/error states
  • Check cancel/go-back flows
  • Check database state correct when deleting/updating (especially regarding relationships)
  • changelog
  • no new deprecations

this makes them available in our dashboard
@nvdk nvdk force-pushed the feature/login-error-reports branch from ba3e402 to 4232f93 Compare December 4, 2024 10:57
@abeforgit abeforgit merged commit b0e23dc into master Dec 4, 2024
@abeforgit abeforgit deleted the feature/login-error-reports branch December 4, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants