OpenConext / OpenConext/OpenConext-manage

Add syntax check on for policy attribute values

Open
#478 0 comments 0 reactions 2 assignees View on GitHub

@baszoetekouw is already working on this.

Since Jan 26, 2026.

API UI
Dominant language
Java
Stars
7
Forks
13
Avg merge
3d 14h
Merged PRs (30d)
7

Description

Add a syntax check for attribute values of PDP checks.

I.e.:

  • SURFteams grouop name: make sure it start with urn:collab:group:surfteams.nl:nl:surfnet:diensten
  • SAB role: make sure it is a single word like "Infrabeheerder" and maybe even check it against a list of known values (configurable in application.yml)
  • affiliation: check against the list of known values (configurable in application.yml)
  • entitlement: check this it is an uri (url or urn)
  • scoped-affiliation: make sure it is of form <affiliation>@<domain>
  • mail address: make sure it looks like an email address
  • schac: make sure it looks like a domain.
Image

In all cases, show any mismatched in the UI, but allow a user to submit/override "incorrect" values, if they wish. It is very probable that in some cases, we need to send out-of-spec values (for example, undefined affiliations).

The best way to implement this seems to be to add configuration to each attribute in allowed_attributes.json, specifying the allowed format (for example, by regular expression). For example,

 {
    "value": "urn:mace:dir:attribute-def:eduPersonAffiliation",
    "label": "Edu person affiliation",
    "validation_regex": "^(student|staff|faculty|employee|member)$"
  }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.