GithubHelp home page GithubHelp logo

audriga / scim-server-php Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 2.0 177 KB

A PHP server library for SCIM 2.0 (RFC 7642 / RFC 7643 / RFC 7644)

Home Page: https://www.audriga.com/en/User_provisioning/Open_Provisioning_Framework

License: MIT License

Makefile 0.50% PHP 99.50%
php rfc-7643 rfc-7644 scim user-management user-provisioning scim-2 scim-server scim2

scim-server-php's Issues

filter: FilterParser very limited, failing spaces in attribute values

While testing Azure AD SCIM provisioning with the PR for a Nextcloud app at https://lab.libreho.st/libre.sh/scim/scimserviceprovider/-/merge_requests/2 I discovered what I think is a limitation/bug in this SCIM library rather than the NC app.

In short, I got this error in the logs:

Opf\Models\SCIM\Standard\Filters\FilterException: Incorrectly formatted AttributeExpression in /var/www/html/custom_apps/scimserviceprovider/vendor/audriga/scim-server-php/src/Util/Filters/FilterParser.php:29

The request was:

GET /Groups?excludedAttributes=members&filter=displayName+eq+%22EDU+All+personal%22

So, the filter that is requested is this:

displayName eq "EDU All personal"

Looking at FilterParser::parseFilterExpression() it seems that it simply splits the filter string on the space character and verifies that the number of elements from that is two or three. It does not seem to take into account quoted values (strings are always quoted in this context), parentheses and similar filter formats.

As far as I can tell, spaces are perfectly valid in strings, according to the SCIM Core specification which references the JSON specification. Regarding filter formats there is support for grouping using () and more complex filtering using [] described here.

On a related note, I noticed that while there's about six groups in the Azure AD I'm testing with, only two of them are synced. It seems that the two that are synced have no spaces in their names, while those that are not synced do have spaces in their names. So perhaps that part is related to spaces as well (could be due to a query failing due to the above filter issue, I haven't digged into this at all yet).

Register the package on packagist.org

Make it easier for developers to find this package and include it in their project by registering it on packagist.org. Shouldn't take more than just a couple of minutes.

I was looking for a package like this but had a hard time finding something usable and only accidentally stumbled on this package in github.

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.