Skip to content

Commit

Permalink
Wordpress rest fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan committed Jan 7, 2021
1 parent 0b21c0b commit 7bd777a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 39 deletions.
4 changes: 4 additions & 0 deletions Workbench/configs-and-secrets/wordpress/httpd/shib.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ ShibCompatValidUser Off
ShibRequestSetting requireSession 1
require shib-session
</Location>
<Location /wordpress/wp-json>
AuthType None
ShibRequestSetting requireSession 0
</Location>

<Location />
AuthType shibboleth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@
</connectorRef>
<connectorConfiguration xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">
<icfc:configurationProperties xmlns:gen774="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/edu.unc.polygon.connector-rest-wordpress/edu.unc.polygon.connector.wordpress.WordpressRestConnector">
<gen774:wordpressPassword>54y6RxN7GfC7aes3</gen774:wordpressPassword>
<gen774:wordpressPassword>password</gen774:wordpressPassword>
<gen774:trustAllCertificates>true</gen774:trustAllCertificates>
<gen774:wordpressUniqueAttribute>id</gen774:wordpressUniqueAttribute>
<gen774:wordpressRestUrl>http://wordpress_server/wp-json</gen774:wordpressRestUrl>
<gen774:wordpressRestUrl>http://wordpress_server/wordpress/wp-json</gen774:wordpressRestUrl>
<gen774:wordpressPasswordAttribute>password</gen774:wordpressPasswordAttribute>
<gen774:wordpressNameAttribute>username</gen774:wordpressNameAttribute>
<gen774:wordpressUsername>admin</gen774:wordpressUsername>
<gen774:wordpressUsername>banderson</gen774:wordpressUsername>
<gen774:wordpressRecyclebinUser>1</gen774:wordpressRecyclebinUser>
<gen774:wordpressSoftUserDelete>true</gen774:wordpressSoftUserDelete>
</icfc:configurationProperties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<c:path>$containingObject/name</c:path>
</source>
<expression>
<value>admin</value>
<value>administrator</value>
</expression>
</outbound>
</attribute>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mkdir /var/www/html/wordpress
mv /var/www/html/* /var/www/html/wordpress/
mv /var/www/html/.htaccess /var/www/html/wordpress/
sed -i "s/define( 'DB_COLLATE', '' );/define( 'DB_COLLATE', '' );\ndefine('JWT_AUTH_SECRET_KEY', 'your-top-secret-key');\ndefine('JWT_AUTH_CORS_ENABLE', true);\ndefine( 'WP_HOME', 'https:\/\/__CSPHOSTNAME__\/wordpress\/' );\ndefine( 'WP_SITEURL', 'https:\/\/__CSPHOSTNAME__\/wordpress\/' );\n/" /var/www/html/wordpress/wp-config.php
sed -i "s/RewriteBase \//RewriteBase \/\nRewriteRule \^wp-json\/\(\.\*\) \/?rest_route=\/\$1 \[L\]\n/" /var/www/html/wordpress/.htaccess
sed -i "s/RewriteBase \//RewriteBase \/wordpress\/\nRewriteRule \^wp-json\/\(\.\*\) \/wordpress\/?rest_route=\/\$1 \[L\]\n/" /var/www/html/wordpress/.htaccess
sed -i 's/RewriteRule \. \/index\.php \[L\]/RewriteCond %{REQUEST_URI} !\\\.sso\/\nRewriteRule \. \/index\.php \[L\]/' /var/www/html/wordpress/.htaccess
sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf
sed -i 's/IncludeOptional conf.d\/\*.conf/IncludeOptional conf.d\/\*.conf\nHttpProtocolOptions Unsafe/' /etc/httpd/conf/httpd.conf
Expand Down

0 comments on commit 7bd777a

Please sign in to comment.