0

This is my first post at Drupal StackExchange. Please feel free to redirect it to the proper forum if this is the incorrect one.

How do I configure Apache Server so that MiniOrange SAML SSO Drupal module does not conflict with my Drupal multilanguage settings?

Here is my problem:

I determine the language from the URL as a Path prefix:

URLs like https://example.com/en/contact set language to English (en) - Default

URLs like https://example.com/fr/contact set language to French (fr)

My default language is English.

If I configure my Drupal multilanguage settings to other detection methods such as session, user, browser then the SAML SSO Drupal module works fine but some (not all) of my Clean URLs no longer work with my current modified Drupal and Apache settings. I’d like to retain my multilanguage settings.

All this happens because of the SAML Drupal module ACS, Recipient and Destination URLs are configured in such a way that the language negotiation happens before reaching the ACS, Recipient and Destination URLs.

ACS URL https://example.com/?q=samlassertion

Recipient URL https://example.com/?q=samlassertion

Destination URL https://example.com/?q=samlassertion

Drupal then prepends the default language code, English (en) in my case, to the ACS, Recipient and Destination URLs as follows breaking the module.

ACS URL https://example.com/en/?q=samlassertion

Recipient URL https://example.com/en/?q=samlassertion

Destination URL https://example.com/en/?q=samlassertion

I know Apache Server 2.4 very well but by no means I’m an expert. I strongly believe this issue can be fixed with a simple and magic Apache configuration set of rules.

What I've done to fix all these issues is by restructuring my existing Drupal Clean URLs to work with the SAML module by using other detection methods such as session, user, browser and by creating rewrite rules to redirect existing URLs to the new structure. I wish I could say that I have completely and 100 % fixed all the problems. But that’s not the case. As I mentioned, some of my URLs break.

Any help is greatly appreciated.

Thanks,

1 Answer 1

0

I figured it out.

The solution to this problem is so simple that i feel a bit embarrassed posting the solution. However, here it goes for those who may stumble upon it. This only needs to happen during the initial configuration and revert back once this step is completed (Based solely on my experience).

  1. Drupal cache for anonymous users needs to be disabled during initial IdP and SP metadata and certificate negotiation
  2. Drupal language negotiation needs to be turned off during initial IdP and SP metadata and certificate negotiation

Victor "Patience and perseverance have a magical effect before which difficulties disappear and obstacles vanish"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.