You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This page documents an exploration of using Apache to serve MDQ queries. The challenge in this is with the forward slash character in entityIDs. By default Apache will not server URLs whose path includes the forward slash character encoded as "%2F". Instead, it returns a 404 to these URLs. The Apache directive AllowEncodedSlashes allows these URLs to pass through.

For my experimentation I started with a basic CentOS 7 virtual machine. I first updated the packages, then installed httpd:

Update and install commands
sudo yum update -y
sudo yum install -y httpd
reboot

Next I added mdq.conf, an apache configuration to serve MDQ files from a configured directory. This file must be placed in the directory /etc/httpd/conf.d. The contents of that file are:

/etc/httpd/conf.d/mdq.conf
<VirtualHost *:80>
  DocumentRoot /var/www/html/mdq

  # Allow %2F in URLs, and pass them through as '%2F'
  AllowEncodedSlashes NoDecode

  ForceType application/samlmetadata+xml
</VirtualHost>

 

 

 

  • No labels