πŸ‡³πŸ‡±Netherlands @tadas.rimkus

Account created on 19 April 2023, over 1 year ago
#

Recent comments

πŸ‡³πŸ‡±Netherlands tadas.rimkus

I have made a new branch to avoid causing any conflicts for anyone using MR!16.
I'm still new to patching and I sometimes get problems patching from editor, but for some reasons patches from mer
My change simply updates the version to 2.x which invalidates CDN cache for tree.js.
We had a problem in our deployment where we would either need to explicitly clear cache to get updated tree.js.

πŸ‡³πŸ‡±Netherlands tadas.rimkus

tadas.rimkus β†’ made their first commit to this issue’s fork.

πŸ‡³πŸ‡±Netherlands tadas.rimkus

https://www.drupal.org/project/context/issues/3355665 πŸ› Uncaught TypeError: $(...).once is not a function RTBC contains a fix to `once` issue.

The other issue is actual block filtering that happens inside admin/structure/context.
This small update to javascript fixes that.

πŸ‡³πŸ‡±Netherlands tadas.rimkus

@Johan I have made a PR to simplesaml/saml2 for container patch, but I did not make a patch for simplesamlphp/simplesamlphp because I noticed that it uses locked saml2 at alpha.6. I'll have to check more and maybe try alpha.6 again, or try to discuss that in an issue first.

@j-barnes The error you're having is related to symfony configuration - I have not encountered this problem before, but I saw it in framwork-bundle, and I have framework-bundle locked at ^6.3.0 and more precisely at this commit

https://github.com/symfony/framework-bundle/commit/4e082c10ae0c8b80e3290...

I suggest trying to update symfony packages if they are behind, maybe this will help.

πŸ‡³πŸ‡±Netherlands tadas.rimkus

I haven't made any issues there yet, I only updated to v8 on Friday, but I will make one later if there isn't anything related.

πŸ‡³πŸ‡±Netherlands tadas.rimkus

I have now updated packages to include

simplesamlphp/saml2:v5.0.0-alpha.8

to avoid needing to patch assert from v6, but this needs additional simplesamlphp_d10_nameidpolicy_fix.patch to work. I will attach it here, it includes:
- module.php update for https port fix.
- NameIDPolicy fix
- trusted regex logic update to support using regular expressions

Here is the current relevant snippets from composer.json

"require": {
    ...
    "drupal/simplesamlphp_auth": "^4",
    ...
    "simplesamlphp/saml2": "^5@alpha",
    "simplesamlphp/simplesamlphp": "dev-master#8c6ee7dd6a6",
    "simplesamlphp/simplesamlphp-module-adfs": "dev-master@dev",
    ...
}
"extra": {
    "patches": {
        ...
      "drupal/simplesamlphp_auth": {
        "Custom patch for D10 compatibility - 3349278_documentation_19": "https://www.drupal.org/files/issues/2023-04-05/3349278_documentation_19.patch",
        "Custom patch for D10 compatibility - 3349278-d10-compatibility_14": "https://www.drupal.org/files/issues/2023-04-04/3349278-d10-compatibility_14.patch",
        "RedirectResponse fix for D10 compatibility": "patches/simplesamlphp_auth_d10_redirect.patch"
      },
      "simplesamlphp/saml2": {
        "Custom patch for d10 Container fix": "patches/simplesamlphp_saml2_d10_container_singleton.patch"
      },
      "simplesamlphp/simplesamlphp": {
        "Custom patch for d10 NameIDPolicy fix": "patches/simplesamlphp_d10_nameidpolicy_fix.patch"
      }
    }
}
πŸ‡³πŸ‡±Netherlands tadas.rimkus

I managed to successfully login using OKTA today after doing some heavy debugging past few days. What I can recommend if you're stuck with 500 and not sure what the actual error is - enable xdebug and start debugging from module.php:
- make sure it goes through module.php and then step into whichever processes it goes
- on exception check trace and find which part threw an exception, and fix that part

Here's a list of potential problems (I had these happening locally):
- you need to add new key 'new_privatekey' - see 'privatekey' and you can use the same value
- configure 'trusted.url.domains' or regex to have a valid domain
- if you use docker, you might get incorrect url (i.e. https://yoursite.com:80 ) - dirty fix for this is adding $_SERVER['SERVER_PORT'] = 443; to module.php after imports.
- baseurlpath change from saml to simplesaml - I changed this in 2 places, I had to link to a different folder locally. This howerver might not be needed, I have this change for a long time. Below is modified snippet from local_install.sh from simplesaml:

# Symlink docroot saml to vendor simplesaml public.
docroot_link="${current_dir}/docroot/saml"
second_docroot_link="${current_dir}/docroot/saml"
if [[ ! -L "${docroot_link}" ]]; then
    echo Creating symlink from docroot simplesaml to vendor simplesaml www
    ln -fs "../vendor/simplesamlphp/simplesamlphp/public" "${docroot_link}"
    ln -fs "../vendor/simplesamlphp/simplesamlphp/public" "${second_docroot_link}"
fi

- decoding failure - this can happen if saml secrets are misconfigured. I had an issue where my secret/adminpass was not used correctly, and I kept getting stuck on decoding failure

Failure decrypting Data (openssl private) - error:02000079:rsa routines::oaep decoding error

. After using correct saml pem/crt secretsalt and auth.adminpassword.

I hope this helps anyone still struggling with 500 error.

πŸ‡³πŸ‡±Netherlands tadas.rimkus

I checked and my version still expects array, so it is likely you have saml2 at different version. These are composer.json related to saml we have:

    "drupal/simplesamlphp_auth": "^4",
    ...
    "simplesamlphp/saml2": "^5@alpha",
    "simplesamlphp/simplesamlphp": "dev-master#8c6ee7dd6a6",
    "simplesamlphp/simplesamlphp-module-adfs": "dev-master@dev",
πŸ‡³πŸ‡±Netherlands tadas.rimkus

Related to #39.

I also use simplesamlphp_auth_d10_redirect.patch in our D10 branch. Currently I have these patches for saml projects:

   ...
      "drupal/simplesamlphp_auth": {
        "Custom patch for D10 compatibility - 3349278_documentation_19": "https://www.drupal.org/files/issues/2023-04-05/3349278_documentation_19.patch",
        "Custom patch for D10 compatibility - 3349278-d10-compatibility_14": "https://www.drupal.org/files/issues/2023-04-04/3349278-d10-compatibility_14.patch",
        "RedirectResponse fix for D10 compatibility": "patches/simplesamlphp_auth_d10_redirect.patch"
      },
      "simplesamlphp/saml2": {
        "Custom patch for d10 Container fix": "patches/simplesamlphp_saml2_d10_container_singleton.patch"
      },
   ...

With these I can login using OKTA, but then I get redirect to https://__URL__/saml/module.php/simplesaml/sp/saml2-acs.php/__SP__ which simply shows

File not found.

__URL__ and __SP__ are different per project, so these I have omitted.

I will try to check our current login process with d9 to see what's missing for proper redirect.

πŸ‡³πŸ‡±Netherlands tadas.rimkus

For anyone struggling with #31 issue you can try simplesamlphp_saml2_d10_container_singleton.patch.
I wrote this when troubleshooting the same problem, and I took the logic from previous working version. I assume there might be some way to instantiate the class before the check is made that now throws an exception, but I haven't used this that much to be sure.

πŸ‡³πŸ‡±Netherlands tadas.rimkus

tadas.rimkus β†’ made their first commit to this issue’s fork.

Production build 0.71.5 2024