Skip to content
Permalink
Browse files

Add LDAP authentication strategy to omniauth

  • Loading branch information...
itrich committed Oct 7, 2019
1 parent c52ef10 commit c8d57a1759ce5bfbfffa0a1a779df4038cdb2353
@@ -23,6 +23,8 @@ gem "figaro"
# Secure decidim with a password until all requirements are met
gem "lockup"

gem "gitlab_omniauth-ldap"

group :development, :test do
gem "byebug", "~> 10.0", platform: :mri
gem "decidim-dev", "0.18.0"
@@ -100,8 +100,7 @@ GEM
actionpack (>= 3.0)
cells (>= 4.1.6, < 5.0.0)
charlock_holmes (0.7.6)
childprocess (2.0.0)
rake (< 13.0)
childprocess (3.0.0)
chronic (0.10.2)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
@@ -344,7 +343,7 @@ GEM
railties (>= 4.2)
doorkeeper-i18n (4.0.1)
equalizer (0.0.11)
erb_lint (0.0.29)
erb_lint (0.0.30)
activesupport
better_html (~> 1.0.7)
html_tokenizer
@@ -382,7 +381,12 @@ GEM
activesupport (>= 4.1, < 6.0)
railties (>= 4.1, < 6.0)
tzinfo (~> 1.2, >= 1.2.2)
geocoder (1.5.1)
geocoder (1.5.2)
gitlab_omniauth-ldap (2.1.1)
net-ldap (~> 0.16)
omniauth (~> 1.3)
pyu-ruby-sasl (>= 0.0.3.3, < 0.1)
rubyntlm (~> 0.5)
globalid (0.4.2)
activesupport (>= 4.2.0)
graphiql-rails (1.4.11)
@@ -448,10 +452,9 @@ GEM
actionmailer (>= 3.2)
letter_opener (~> 1.0)
railties (>= 3.2)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
listen (3.2.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lockup (1.5.1)
rails (>= 3, < 6.1)
lograge (0.11.2)
@@ -487,6 +490,7 @@ GEM
multi_xml (0.6.0)
multipart-post (2.1.1)
mustache (1.1.0)
net-ldap (0.16.1)
netrc (0.11.0)
nio4r (2.5.2)
nobspw (0.6.1)
@@ -526,7 +530,7 @@ GEM
request_store (~> 1.1)
paper_trail-association_tracking (1.1.1)
parallel (1.17.0)
parser (2.6.4.1)
parser (2.6.5.0)
ast (~> 2.4.0)
pg (1.1.4)
pg_search (2.3.0)
@@ -544,6 +548,7 @@ GEM
progressbar (1.10.1)
public_suffix (4.0.1)
puma (3.12.1)
pyu-ruby-sasl (0.0.3.3)
rack (2.0.7)
rack-attack (5.4.2)
rack (>= 1.0, < 3)
@@ -584,7 +589,7 @@ GEM
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (12.3.3)
rake (13.0.0)
ransack (2.1.1)
actionpack (>= 5.0)
activerecord (>= 5.0)
@@ -621,13 +626,13 @@ GEM
rspec-rails (~> 3.2)
rspec-core (3.8.2)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.4)
rspec-expectations (3.8.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-html-matchers (0.9.1)
nokogiri (~> 1)
rspec (>= 3.0.0.a, < 4)
rspec-mocks (3.8.1)
rspec-mocks (3.8.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-rails (3.8.2)
@@ -638,7 +643,7 @@ GEM
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.2)
rspec-support (3.8.3)
rspec_junit_formatter (0.3.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.58.2)
@@ -653,7 +658,7 @@ GEM
rubocop (>= 0.58.0)
ruby-ole (1.2.12.2)
ruby-progressbar (1.10.1)
ruby_dep (1.5.0)
rubyntlm (0.6.2)
rubyzip (1.3.0)
safe_yaml (1.0.5)
sass (3.4.25)
@@ -668,10 +673,10 @@ GEM
sprockets-rails
tilt
searchlight (4.1.0)
selenium-webdriver (3.142.5)
childprocess (>= 0.5, < 3.0)
selenium-webdriver (3.142.6)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
sidekiq (6.0.0)
sidekiq (6.0.1)
connection_pool (>= 2.2.2)
rack (>= 2.0.0)
rack-protection (>= 2.0.0)
@@ -763,6 +768,7 @@ DEPENDENCIES
deface
faker
figaro
gitlab_omniauth-ldap
letter_opener_web (~> 1.3)
listen (~> 3.1)
lockup
Binary file not shown.
@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="66.064972mm"
height="20.831598mm"
viewBox="0 0 66.064972 20.831598"
version="1.1"
id="svg8"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="logo_blue.svg">
<defs
id="defs2">
<clipPath
id="clipPath831"
clipPathUnits="userSpaceOnUse">
<path
inkscape:connector-curvature="0"
id="path829"
d="M 0,74 H 211 V 0 H 0 Z" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="114.11453"
inkscape:cy="13.651874"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="-8"
inkscape:window-y="457"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-40.672869,-34.852055)">
<g
transform="matrix(0.35277777,0,0,-0.35277777,36.439677,58.135494)"
inkscape:label="Logo_Stadt_Buehl"
id="g823">
<g
id="g825">
<g
clip-path="url(#clipPath831)"
id="g827">
<g
transform="translate(126.2422,58.5503)"
id="g833">
<path
inkscape:connector-curvature="0"
id="path835"
style="fill:#1c63b7;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -12.5,-9.7 -20.75,-25.3 -20.15,-41.3 l -12.451,8.2 c 0.401,15.6 7.701,30.2 20.851,40.55 z" />
</g>
<g
transform="translate(129.6416,39.1001)"
id="g837">
<path
inkscape:connector-curvature="0"
id="path839"
style="fill:#1c63b7;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -0.85,-12.2 -3.399,-25.3 -15.399,-32.15 l -10.801,7.2 c 11.65,6.15 14.9,20.85 13.45,32.9 z" />
</g>
<g
transform="translate(24.3066,29.5615)"
id="g841">
<path
inkscape:connector-curvature="0"
id="path843"
style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0.442,1.496 0.68,2.312 1.088,3.365 -1.292,1.021 -3.128,1.666 -5.575,1.666 -4.046,0 -7.65,-2.584 -7.65,-7.275 0,-7.717 10.131,-6.358 10.131,-11.491 0,-1.904 -1.326,-3.467 -3.977,-3.467 -2.754,0 -4.318,1.699 -4.692,3.672 h -0.646 c -0.238,-1.531 -0.544,-2.754 -0.986,-4.319 0.986,-0.748 3.026,-1.462 5.474,-1.462 5.405,0 9.009,3.128 9.009,7.684 0,7.718 -10.335,6.459 -10.335,11.491 0,1.632 1.462,3.06 3.535,3.06 2.074,0 3.4,-0.987 4.114,-2.924 z" />
</g>
<g
transform="translate(35.4922,26.9092)"
id="g845">
<path
inkscape:connector-curvature="0"
id="path847"
style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0,2.04 0.136,4.556 0.306,6.018 l -0.34,0.238 C -1.564,5.508 -3.128,4.794 -4.691,4.148 -4.589,2.414 -4.556,1.395 -4.556,-0.033 l -2.379,0.101 c 0.068,-0.339 0.102,-0.611 0.102,-0.918 0,-0.271 -0.034,-0.577 -0.102,-0.849 l 2.379,0.034 c 0,-2.856 -0.237,-7.106 -0.237,-9.724 0,-3.433 1.495,-5.269 4.317,-5.269 1.292,0 2.822,0.341 3.705,0.884 v 1.394 c -0.407,-0.238 -0.713,-0.34 -1.563,-0.34 -1.564,0 -1.904,0.782 -1.904,5.507 0,1.836 0.102,5.542 0.238,7.581 L 2.992,-1.699 C 2.924,-1.427 2.89,-1.121 2.89,-0.85 c 0,0.307 0.034,0.579 0.102,0.918 z" />
</g>
<g
transform="translate(49.0801,15.9629)"
id="g849">
<path
inkscape:connector-curvature="0"
id="path851"
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="m 0,0 c 0,-2.21 -1.02,-3.365 -2.516,-3.365 -1.19,0 -1.938,0.917 -1.938,2.583 0,3.433 2.55,3.263 4.488,4.351 C 0.034,2.787 0,1.972 0,0 m -7.615,7.207 h 0.238 c 0.68,0.952 2.516,1.87 4.08,1.87 2.039,0 3.263,-1.326 3.263,-2.958 0,-1.223 -0.34,-1.496 -4.147,-2.414 -3.06,-0.748 -5.032,-2.006 -5.032,-4.963 0,-2.176 1.428,-4.454 4.861,-4.454 2.075,0 3.366,1.055 4.42,2.483 0.544,-1.531 1.564,-2.483 3.23,-2.483 1.054,0 1.836,0.238 3.127,0.918 v 0.816 c -1.393,0 -2.005,0.205 -2.005,2.346 0,2.447 0.101,4.827 0.101,7.717 0,4.012 -2.617,5.542 -6.221,5.542 -2.141,0 -4.521,-0.851 -6.357,-2.38 z" />
</g>
<g
transform="translate(62.2036,18.5801)"
id="g853">
<path
inkscape:connector-curvature="0"
id="path855"
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="m 0,0 c 0,5.202 1.666,6.664 3.094,6.664 1.767,0 3.025,-1.836 3.025,-6.052 0,-4.895 -1.359,-6.833 -3.195,-6.833 C 1.394,-6.221 0,-4.623 0,0 m 10.675,6.086 c 0,4.453 0.102,7.921 0.272,11.763 -0.578,-0.102 -1.564,-0.17 -2.55,-0.17 -0.986,0 -1.972,0.068 -2.55,0.17 0.171,-3.842 0.272,-7.31 0.272,-11.356 H 6.051 C 5.27,7.922 3.501,9.01 1.53,9.01 c -3.672,0 -6.562,-3.638 -6.562,-8.5 0,-4.827 1.905,-8.839 6.494,-8.839 2.618,0 4.012,1.326 4.861,3.298 l 0.069,-0.068 c 0,-0.306 -0.171,-2.482 -0.273,-2.788 0.443,0.102 1.36,0.17 2.278,0.17 0.986,0 1.972,-0.068 2.55,-0.17 -0.17,3.842 -0.272,7.31 -0.272,11.763 z" />
</g>
<g
transform="translate(82.6924,26.9092)"
id="g857">
<path
inkscape:connector-curvature="0"
id="path859"
style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0,2.04 0.136,4.556 0.306,6.018 l -0.34,0.238 C -1.563,5.508 -3.127,4.794 -4.691,4.148 -4.589,2.414 -4.555,1.395 -4.555,-0.033 l -2.38,0.101 c 0.068,-0.339 0.102,-0.611 0.102,-0.918 0,-0.271 -0.034,-0.577 -0.102,-0.849 l 2.38,0.034 c 0,-2.856 -0.238,-7.106 -0.238,-9.724 0,-3.433 1.496,-5.269 4.317,-5.269 1.292,0 2.822,0.341 3.706,0.884 v 1.394 c -0.408,-0.238 -0.714,-0.34 -1.564,-0.34 -1.564,0 -1.904,0.782 -1.904,5.507 0,1.836 0.102,5.542 0.238,7.581 L 2.992,-1.699 C 2.924,-1.427 2.89,-1.121 2.89,-0.85 c 0,0.307 0.034,0.579 0.102,0.918 z" />
</g>
<g
transform="translate(147.1865,17.2549)"
id="g861">
<path
inkscape:connector-curvature="0"
id="path863"
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="m 0,0 c 0,-2.958 -1.733,-4.624 -3.74,-4.624 -0.747,0 -1.257,0.034 -1.869,0.068 0,1.19 -0.069,3.808 -0.069,5.95 0,1.393 0.034,2.345 0.034,3.297 0.409,0 0.85,0.035 1.462,0.035 C -1.462,4.726 0,3.161 0,0 m -0.238,10.98 c 0,-2.889 -1.938,-4.317 -3.875,-4.317 h -1.531 c 0,1.155 -0.034,2.244 -0.034,3.468 0,1.155 0.069,3.059 0.137,4.725 0.441,0.069 0.68,0.102 1.665,0.102 2.687,0 3.638,-1.802 3.638,-3.978 M -10.709,2.855 c 0,-3.807 -0.068,-6.425 -0.271,-9.417 0.748,0.069 2.209,0.17 3.433,0.17 1.699,0 3.195,-0.17 4.997,-0.17 4.046,0 7.921,1.938 7.921,6.799 0,4.115 -4.045,5.61 -6.119,5.712 v 0.069 c 2.108,0.339 5.542,1.903 5.542,5.608 0,3.706 -2.788,5.27 -6.868,5.27 -1.938,0 -4.181,-0.17 -6.119,-0.17 -1.122,0 -2.039,0.102 -2.787,0.17 0.203,-2.992 0.271,-5.61 0.271,-9.417 z" />
</g>
<g
transform="translate(166.418,10.6934)"
id="g865">
<path
inkscape:connector-curvature="0"
id="path867"
style="fill:#231f20;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="M 0,0 C 0.884,0.068 1.666,0.17 2.481,0.17 3.298,0.17 4.079,0.068 4.896,0 4.691,2.38 4.623,4.793 4.623,7.547 v 1.36 c 0,2.754 0.068,5.167 0.273,7.547 -0.613,-0.067 -1.497,-0.17 -2.55,-0.17 -1.054,0 -1.972,0.103 -2.55,0.17 C 0,14.074 0.068,11.661 0.068,8.907 V 7.547 C 0.068,4.419 -0.85,2.55 -2.89,2.55 c -1.767,0 -2.788,1.326 -2.788,4.147 0,4.046 0.069,7.31 0.374,9.757 -0.578,-0.101 -1.563,-0.17 -2.55,-0.17 -0.985,0 -1.971,0.069 -2.549,0.17 0.068,-1.733 0.17,-3.502 0.17,-4.93 0,-1.767 -0.136,-3.399 -0.136,-5.711 0,-4.351 1.904,-6.255 5.304,-6.255 2.141,0 3.876,1.156 5.133,2.992 h 0.068 z m -1.36,21.689 c 0,-1.223 0.986,-2.21 2.21,-2.21 1.224,0 2.21,0.987 2.21,2.21 0,1.225 -0.986,2.21 -2.21,2.21 -1.224,0 -2.21,-0.985 -2.21,-2.21 m -7.173,0 c 0,-1.223 0.986,-2.21 2.21,-2.21 1.223,0 2.21,0.987 2.21,2.21 0,1.225 -0.987,2.21 -2.21,2.21 -1.224,0 -2.21,-0.985 -2.21,-2.21" />
</g>
<g
transform="translate(175.1777,22.4561)"
id="g869">
<path
inkscape:connector-curvature="0"
id="path871"
style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0,-4.453 -0.102,-7.921 -0.271,-11.763 0.578,0.102 1.563,0.17 2.549,0.17 0.986,0 1.972,-0.068 2.55,-0.17 -0.204,2.38 -0.272,6.289 -0.272,7.547 v 1.361 c 0,3.127 0.918,4.997 2.958,4.997 1.767,0 2.787,-1.326 2.787,-4.148 0,-4.046 -0.068,-7.309 -0.374,-9.757 0.578,0.102 1.564,0.17 2.551,0.17 0.985,0 1.971,-0.068 2.548,-0.17 -0.067,1.735 -0.17,3.502 -0.17,4.93 0,1.768 0.137,3.399 0.137,5.711 0,4.351 -1.904,6.256 -5.304,6.256 -2.141,0 -3.876,-1.156 -5.065,-2.992 L 4.556,2.21 c 0,4.453 0.102,7.921 0.272,11.763 -0.578,-0.102 -1.564,-0.17 -2.55,-0.17 -0.986,0 -1.971,0.068 -2.549,0.17 C -0.102,10.131 0,6.663 0,2.21 Z" />
</g>
<g
transform="translate(194.4434,22.4561)"
id="g873">
<path
inkscape:connector-curvature="0"
id="path875"
style="fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0,-4.453 -0.103,-7.921 -0.272,-11.763 0.578,0.102 1.564,0.17 2.549,0.17 0.987,0 1.972,-0.068 2.55,-0.17 C 4.657,-7.921 4.556,-4.453 4.556,0 v 2.21 c 0,4.453 0.101,7.921 0.271,11.763 -0.578,-0.102 -1.563,-0.17 -2.55,-0.17 -0.985,0 -1.971,0.068 -2.549,0.17 C -0.103,10.131 0,6.663 0,2.21 Z" />
</g>
</g>
</g>
</g>
</g>
</svg>
@@ -135,6 +135,11 @@ a:hover .author__name{
z-index: 701;
}

.button--ldap .button--social__icon .icon{
display: unset !important;
height: unset;
}

.section-heading.section-heading:before{
background: image-url("buehl/icon.svg") no-repeat center;
background-size: contain;

0 comments on commit c8d57a1

Please sign in to comment.
You can’t perform that action at this time.