Account created on 24 January 2014, about 11 years ago
  • Freelance Drupal developer at DICTU 
#

Merge Requests

More

Recent comments

🇳🇱Netherlands bojan_dev

How did you verify that the tokens are invalided for those specific entity updates?

In hook simple_oauth_entity_update the tokens get deleted if the consumer or user entity get's updated. In 📌 Auth revoke on profile update Needs work we are trying to improve this logic with configurations.

🇳🇱Netherlands bojan_dev

This can only occur if the config "simple_oauth.settings" or the setting inside "token_cron_batch_size" isn't available. I wouldn't make the limit argument nullable, I rather see it addressed in the if statement on simple_oauth.module:30.

🇳🇱Netherlands bojan_dev

If this still is occuring on the latest version, feel free to reopen the issue, closing it for now.

🇳🇱Netherlands bojan_dev

Thanks for sharing this @chfoidl, I dropped some comments and I wonder if it's even possible to have test coverage for this.

🇳🇱Netherlands bojan_dev

To be in line with the OAuth2 spec: https://datatracker.ietf.org/doc/html/rfc6749#section-3.3
I have made the token endpoint require the token scope parameter when there is no default scopes available on the client/consumer when dealing with the client_credentials.

Could you please review my last commit?

🇳🇱Netherlands bojan_dev

If there are no scopes requested and no scopes are set on the consumer with the client credentials, in 5.2 it will fallback on the default user (set on the consumer), with 6.0 you won't have any access. We definitely need to address this in 6.0, I think we should grant all scopes that support client credentials if no scopes are set on the request and consumer.

Regarding the tiny module, it would be interesting to have some testing/debug submodule available that does this. I would be open to add this to the module.

🇳🇱Netherlands bojan_dev

bojan_dev made their first commit to this issue’s fork.

🇳🇱Netherlands bojan_dev

I like the simplistic implementation from @kingdutch, so I have used that as base and made it configurable.
The MR 164 covers the following:
- Invalidate tokens by specific actions (multiple can be selected) via settings.
- Available actions can be altered by swapping out/decorating ```TokenExpiryTriggerHandler` service``` + ```Oauth2TokenSettingsForm```.
- Default actions are set so we don't introduce BC.

Todo: add test coverage.

🇳🇱Netherlands bojan_dev

bojan_dev made their first commit to this issue’s fork.

🇳🇱Netherlands bojan_dev

Nice work idebr! I merged the one which fixes the cspell job.

🇳🇱Netherlands bojan_dev

I went ahead and made the default scopes limit the allowed scopes per consumer. Can somebody please review?

🇳🇱Netherlands bojan_dev

I have no feedback, the implementation looks great, you have thought well about the upgrade path, merged ;)

🇳🇱Netherlands bojan_dev

This is a valid point, we should definitely reintroduce this feature. The question is how? We could add an extra responsibility on the default scopes, so it limits the scopes per consumer or we can introduce an additional field where we can specify allowed scopes. I’m open for suggestions.

🇳🇱Netherlands bojan_dev

I had a quick peek and let me first say that it is great work what you did here @tstoeckler. Unfortunately I jammed with work, so an extensive review I can't give in the short term. Any dev's that what to speed up the process, feel free to review.

🇳🇱Netherlands bojan_dev

I agree with @kingdutch points, we shouldn't change the default behavior for invalidating the tokens and I rather not introduce a new major version on the 5.x. For 6.0.x on the other hand we are still in beta release and there is more active development, we could introduce a new token invalidation behavior there. The question is if this (token invalidation) change benefits a larger target group, I believe it does, so I would propose making the token invalidation configurable via config settings per case (password change, account blocked, roles change).

🇳🇱Netherlands bojan_dev

bojan_dev changed the visibility of the branch 3484623-the-autocomplete-routeendpoint to hidden.

🇳🇱Netherlands bojan_dev

Authenticated request are by default not cachable (coupled or decoupled). You could try enabling "Dynamic Page Cache" module, it caches pages minus the personalized parts (both anonymous & authenticated). If you want to leverage a reverse-proxy you could take a look on https://www.drupal.org/project/adv_varnish .

🇳🇱Netherlands bojan_dev

Remaining task (for 5.2.x): copy the Kernel tests from MR !66 to !64.

🇳🇱Netherlands bojan_dev

See comments from bradjones1: #6, #8 and #23.

I'm pretty jammed with work, so anyone able to write tests will be welcome.

🇳🇱Netherlands bojan_dev

I'm happy to merge it, but the MR's are still missing test coverage, so feel free to contribute.

🇳🇱Netherlands bojan_dev

The project page and README.md does mention that it uses the PHP library "OAuth 2.0 Server". Also installing modules via composer is the recommended way, the following quote covers it:

The recommended way of adding a module is with Composer, especially for modules that have dependencies. Several modules will just not work if you only add the zip / tar.gz file.

Source: https://www.drupal.org/docs/extending-drupal/installing-modules#s-severa...

🇳🇱Netherlands bojan_dev

Added setting/kill switch as suggested, please review.

🇳🇱Netherlands bojan_dev

bojan_dev made their first commit to this issue’s fork.

🇳🇱Netherlands bojan_dev

Found related issue: Allow to index empty fields Active
I will try to build the kill switch and contribute in the other issue.

🇳🇱Netherlands bojan_dev

I think to properly check whether the row might have the property in question, you will always need to load the entity

I rather find a solution to not load entities, this makes even more sense when using Search API Solr, where you actually want to only use Solr instead of DB queries.

I also don’t quite understand your use case, to be honest. If your view only lists that single field, why include nodes that don’t have it at all? Why not add a “associated reference field: not empty” filter to the view?

For example imagine a specific CT that has tags or a category and you want to display the taxonomy label it in the search results. I don't want to add that filter because that would mean I won't get other CT's in the search. You need to see it as search results that for one or more CT's has more info to show.

🇳🇱Netherlands bojan_dev

This was already resolved in 6.0.x, thanks for the MR.

Production build 0.71.5 2024