{"id":343832,"date":"2023-01-12T09:02:04","date_gmt":"2023-01-12T09:02:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=343832"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=343832","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LDAP-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Deckhouse<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><a href=\"https:\/\/deckhouse.ru\/\"><u>Deckhouse<\/u><\/a> \u2014 Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c\u0438. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 Deckhouse \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/\"><u>user-authn<\/u><\/a>. \u041e\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441 Kubernetes \u0438 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 Grafana.<\/p>\n<p>user-authn \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438: GitHub, GitLab, Bitbucket Cloud, Crowd, LDAP \u0438 OIDC. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 LDAP \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3ee\/be9\/8df\/3eebe98df5289896b4dad1571e50c67a.png\" width=\"1878\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3ee\/be9\/8df\/3eebe98df5289896b4dad1571e50c67a.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<p>\u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Kubernetes \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 Deckhouse. \u041a\u043b\u0430\u0441\u0442\u0435\u0440 <a href=\"https:\/\/deckhouse.ru\/gs\/\"><u>\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c<\/u><\/a> \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0438\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e (\u043d\u0430 kind). \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0442 15 \u0434\u043e 30 \u043c\u0438\u043d\u0443\u0442.\u00a0<\/p>\n<p><a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/deckhouse-configure-global.html\"><u>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/u><\/a> Deckhouse \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/deckhouse-configure-global.html#parameters-modules-publicdomaintemplate\"><u>publicDomainTemplate<\/u><\/a> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d DNS-\u0438\u043c\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 IP-\u0430\u0434\u0440\u0435\u0441\u0430 Ingress-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0442\u0438\u043f\u0430 <a href=\"https:\/\/sslip.io\/\"><u>sslip.io<\/u><\/a>; \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 publicDomainTemplate \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d <code>%s.x.x.x.x.sslip.io<\/code>, \u0433\u0434\u0435 <code>x.x.x.x<\/code> \u2014 \u0432\u0430\u0448 IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<p>\u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d <code>openldap-demo<\/code>. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LDAP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h2>\n<p>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c LDAP-\u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"bash\">kubectl create -f https:\/\/raw.githubusercontent.com\/flant\/examples\/master\/2022\/11-d8-user-authn\/ldap.yaml<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e Pod \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 <code>Running<\/code>:<\/p>\n<pre><code># kubectl -n openldap-demo get pod  NAME                                            READY   STATUS    RESTARTS   AGE ldap-6c949b6c6d-4zxg7                    1\/1      Running     0                   1m<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0433\u043e LDAP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<ul>\n<li>\n<p><code>johndoe@example.com<\/code> (\u043f\u0430\u0440\u043e\u043b\u044c <code>bar<\/code>) \u2014 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 <code>admins<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>janedoe@example.com<\/code> (\u043f\u0430\u0440\u043e\u043b\u044c <code>foo<\/code>) \u2014 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u044b <code>admins<\/code> \u0438 <code>developers<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e <code>janedoe@example.com<\/code> \u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b <code>developers<\/code>.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0440\u0435\u0441\u0443\u0440\u0441 DexProvider, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u00ab\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u00bb \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 LDAP-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>kubectl create -f https:\/\/raw.githubusercontent.com\/flant\/examples\/master\/2022\/11-d8-user-authn\/dex-provider.yaml<\/code><\/pre>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 echo-server, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0435.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0443\u043a\u0430\u0437\u0430\u0432 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>DOMAINNAME<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432\u0430\u043c\u0438 \u0434\u043e\u043c\u0435\u043d:<\/p>\n<pre><code>DOMAINNAME=&lt;\u0412\u0410\u0428_\u0414\u041e\u041c\u0415\u041d> curl https:\/\/raw.githubusercontent.com\/flant\/examples\/master\/2022\/11-d8-user-authn\/echo-service.yaml | sed \"s\/{{ __cluster__domain__ }}\/${DOMAINNAME}\/\" | kubectl create -f -<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d <code>openldap-demo<\/code>. Ingress-\u0440\u0435\u0441\u0443\u0440\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d <code>echo<\/code>.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e Pod <code>echoserver<\/code> \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f:<\/p>\n<pre><code># kubectl -n openldap-demo get pod  NAME                                            READY   STATUS    RESTARTS   AGE echoserver-6944fb9c86-9flgh            1\/1      Running     0                   1m ldap-6c949b6c6d-4zxg7                    1\/1      Running     0                   3m<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>echo.&lt;\u0412\u0410\u0428_\u0414\u041e\u041c\u0415\u041d><\/code> \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/h2>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443: \u0437\u0430\u043a\u0440\u043e\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u043d\u0443\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/cr.html#dexauthenticator\"><u>DexAuthenticator<\/u><\/a> \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/github.com\/oauth2-proxy\/oauth2-proxy\"><u>OAuth2 Proxy<\/u><\/a>;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 OAuth2 Proxy \u0432 Ingress-\u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>OAuth2 Proxy \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043e\u0442 nginx \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 LDAP.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441 DexAuthenticator, \u0443\u043a\u0430\u0437\u0430\u0432 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>DOMAINNAME<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432\u0430\u043c\u0438 \u0434\u043e\u043c\u0435\u043d:<\/p>\n<pre><code>DOMAINNAME=&lt;\u0412\u0410\u0428_\u0414\u041e\u041c\u0415\u041d> curl https:\/\/raw.githubusercontent.com\/flant\/examples\/master\/2022\/11-d8-user-authn\/dex-authenticator.yaml | sed \"s\/{{ __cluster__domain__ }}\/${DOMAINNAME}\/\" | kubectl create -f -<\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d <code>openldap-demo<\/code> \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f Pod <code>echoserver-dex-authenticator<\/code>:<\/p>\n<pre><code># kubectl -n openldap-demo get pod NAME                                                         READY   STATUS    RESTARTS   AGE echoserver-6944fb9c86-9flgh                     1\/1         Running   0                    5m echoserver-dex-authenticator-6bdd57cc95-wvbgk   2\/2     Running   1          2m ldap-6c949b6c6d-4zxg7                             1\/1          Running   0                    8m<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 DexAuthenticator. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/cr.html#dexauthenticator-v1-spec-allowedgroups\"><u>spec.allowedGroups<\/u><\/a>: \u043e\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0440\u0443\u043f\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0433\u0440\u0443\u043f\u043f\u0430 <code>developers<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>janedoe@example.com<\/code>: <\/p>\n<pre><code class=\"yaml\"># kubectl -n openldap-demo get dexauthenticator echoserver -o yaml apiVersion: deckhouse.io\/v1 kind: DexAuthenticator ... spec:   allowedGroups:   - developers ...<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c Ingess-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b OAuth2 Proxy.\u00a0<\/p>\n<p>\u0423\u043a\u0430\u0436\u0435\u043c \u0434\u0432\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 Ingress-\u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">kubectl -n openldap-demo annotate ingress echoserver 'nginx.ingress.kubernetes.io\/auth-signin=https:\/\/$host\/dex-authenticator\/sign_in' kubectl -n openldap-demo annotate ingress echoserver 'nginx.ingress.kubernetes.io\/auth-url=https:\/\/echoserver-dex-authenticator.openldap-demo.svc.cluster.local\/dex-authenticator\/auth'<\/code><\/pre>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u2014 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0445\u043e\u0434\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/be5\/e3c\/463\/be5e3c4635b930e6987bfa508b542ed8.png\" width=\"527\" height=\"305\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/be5\/e3c\/463\/be5e3c4635b930e6987bfa508b542ed8.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0445\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 LDAP-\u0441\u0435\u0440\u0432\u0435\u0440: <em>Log in with OpenLDAP Demo<\/em>. \u0412\u043e\u0439\u0434\u0435\u043c \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c <code>janedoe@example.com<\/code> (\u043f\u0430\u0440\u043e\u043b\u044c \u0432 LDAP: <code>foo<\/code>).<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e. \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u043e\u0439\u0442\u0438 \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u2014 <code>johndoe@example.com<\/code> (\u043f\u0430\u0440\u043e\u043b\u044c \u0432 LDAP: <code>bar<\/code>). \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443 <code>User not in allowed groups<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>johndoe<\/code> \u043d\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 <code>developers<\/code>.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0441\u043e\u0437\u0434\u0430\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 DexProvider. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430.\u00a0<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <em>\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/em>, \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c, \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes. \u041e\u0431 \u044d\u0442\u043e\u043c \u2014 \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h2>\n<p>\u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c custom resource <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/cr.html#user\"><u>User<\/u><\/a>.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>openldap-demo@example.com<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 <code>developers<\/code>, \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c <code>bar<\/code> \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0436\u0438\u0437\u043d\u0438 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u2014 24 \u0447\u0430\u0441\u0430:<\/p>\n<pre><code class=\"yaml\">kubectl create -f - &lt;&lt;\"EOF\" apiVersion: deckhouse.io\/v1 kind: User metadata:  name: openldap-demo spec:  email: openldap-demo@example.com  # echo \"bar\" | htpasswd -BinC 10 \"\" | cut -d: -f2  password: '$2a$10$spCnoGzDIRicDfiTmtImwu7sn2Csjj6oWRoLjNs6N\/bV3WDsxioui'  groups:    - developers  ttl: 24h EOF<\/code><\/pre>\n<blockquote>\n<p><em>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043f\u043e\u043b\u044e <\/em><code>password<\/code><em> \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u043e\u043b\u044f. \u041e\u043d\u0438 \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c.<\/em><\/p>\n<\/blockquote>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u043d, \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0439\u0442\u0438, \u0432\u044b\u0431\u0440\u0430\u0432 <em>Log in with Email<\/em>.<\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/\"><u>user-authn<\/u><\/a>. \u0422\u0430\u043a\u0436\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/usage.html\"><u>\u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/u><\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<h2>\u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439<\/h2>\n<p>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\">kubectl delete dexprovider openldap-demo kubectl delete user openldap-demo kubectl delete ns openldap-demo<\/code><\/pre>\n<h2>P.S.<\/h2>\n<p>\u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/707422\/\">\u00ab<u>\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Deckhouse \u0432 Yandex Cloud<\/u>\u00bb<\/a>;\u00a0<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/682520\/\">\u00ab<u>\u0422\u0435\u0440\u043d\u0438\u0441\u0442\u044b\u0439 \u043f\u0443\u0442\u044c \u043a eBPF, \u0438\u043b\u0438 \u041a\u0430\u043a \u043c\u044b Cilium \u0432 Deckhouse \u0432\u043d\u0435\u0434\u0440\u044f\u043b\u0438<\/u>\u00bb<\/a>;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/news\/t\/597623\/\">\u00ab<u>Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Deckhouse \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u0415\u0434\u0438\u043d\u043e\u043c \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u041f\u041e<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/710010\/\"> https:\/\/habr.com\/ru\/company\/flant\/blog\/710010\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><a href=\"https:\/\/deckhouse.ru\/\"><u>Deckhouse<\/u><\/a> \u2014 Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c\u0438. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 Deckhouse \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/\"><u>user-authn<\/u><\/a>. \u041e\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441 Kubernetes \u0438 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 Grafana.<\/p>\n<p>user-authn \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438: GitHub, GitLab, Bitbucket Cloud, Crowd, LDAP \u0438 OIDC. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 LDAP \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<p>\u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Kubernetes \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 Deckhouse. \u041a\u043b\u0430\u0441\u0442\u0435\u0440 <a href=\"https:\/\/deckhouse.ru\/gs\/\"><u>\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c<\/u><\/a> \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0438\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e (\u043d\u0430 kind). \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0442 15 \u0434\u043e 30 \u043c\u0438\u043d\u0443\u0442.\u00a0<\/p>\n<p><a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/deckhouse-configure-global.html\"><u>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/u><\/a> Deckhouse \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/deckhouse-configure-global.html#parameters-modules-publicdomaintemplate\"><u>publicDomainTemplate<\/u><\/a> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d DNS-\u0438\u043c\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 IP-\u0430\u0434\u0440\u0435\u0441\u0430 Ingress-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0442\u0438\u043f\u0430 <a href=\"https:\/\/sslip.io\/\"><u>sslip.io<\/u><\/a>; \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 publicDomainTemplate \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d <code>%s.x.x.x.x.sslip.io<\/code>, \u0433\u0434\u0435 <code>x.x.x.x<\/code> \u2014 \u0432\u0430\u0448 IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<p>\u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d <code>openldap-demo<\/code>. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LDAP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h2>\n<p>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c LDAP-\u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"bash\">kubectl create -f https:\/\/raw.githubusercontent.com\/flant\/examples\/master\/2022\/11-d8-user-authn\/ldap.yaml<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e Pod \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 <code>Running<\/code>:<\/p>\n<pre><code># kubectl -n openldap-demo get pod  NAME                                            READY   STATUS    RESTARTS   AGE ldap-6c949b6c6d-4zxg7                    1\/1      Running     0                   1m<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0433\u043e LDAP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<ul>\n<li>\n<p><code>johndoe@example.com<\/code> (\u043f\u0430\u0440\u043e\u043b\u044c <code>bar<\/code>) \u2014 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 <code>admins<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>janedoe@example.com<\/code> (\u043f\u0430\u0440\u043e\u043b\u044c <code>foo<\/code>) \u2014 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u044b <code>admins<\/code> \u0438 <code>developers<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e <code>janedoe@example.com<\/code> \u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b <code>developers<\/code>.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0440\u0435\u0441\u0443\u0440\u0441 DexProvider, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u00ab\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u00bb \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 LDAP-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>kubectl create -f https:\/\/raw.githubusercontent.com\/flant\/examples\/master\/2022\/11-d8-user-authn\/dex-provider.yaml<\/code><\/pre>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 echo-server, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0435.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0443\u043a\u0430\u0437\u0430\u0432 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>DOMAINNAME<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432\u0430\u043c\u0438 \u0434\u043e\u043c\u0435\u043d:<\/p>\n<pre><code>DOMAINNAME=&lt;\u0412\u0410\u0428_\u0414\u041e\u041c\u0415\u041d> curl https:\/\/raw.githubusercontent.com\/flant\/examples\/master\/2022\/11-d8-user-authn\/echo-service.yaml | sed \"s\/{{ __cluster__domain__ }}\/${DOMAINNAME}\/\" | kubectl create -f -<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d <code>openldap-demo<\/code>. Ingress-\u0440\u0435\u0441\u0443\u0440\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d <code>echo<\/code>.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e Pod <code>echoserver<\/code> \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f:<\/p>\n<pre><code># kubectl -n openldap-demo get pod  NAME                                            READY   STATUS    RESTARTS   AGE echoserver-6944fb9c86-9flgh            1\/1      Running     0                   1m ldap-6c949b6c6d-4zxg7                    1\/1      Running     0                   3m<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>echo.&lt;\u0412\u0410\u0428_\u0414\u041e\u041c\u0415\u041d><\/code> \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/h2>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443: \u0437\u0430\u043a\u0440\u043e\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u043d\u0443\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/cr.html#dexauthenticator\"><u>DexAuthenticator<\/u><\/a> \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/github.com\/oauth2-proxy\/oauth2-proxy\"><u>OAuth2 Proxy<\/u><\/a>;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 OAuth2 Proxy \u0432 Ingress-\u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>OAuth2 Proxy \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043e\u0442 nginx \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 LDAP.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441 DexAuthenticator, \u0443\u043a\u0430\u0437\u0430\u0432 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>DOMAINNAME<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432\u0430\u043c\u0438 \u0434\u043e\u043c\u0435\u043d:<\/p>\n<pre><code>DOMAINNAME=&lt;\u0412\u0410\u0428_\u0414\u041e\u041c\u0415\u041d> curl https:\/\/raw.githubusercontent.com\/flant\/examples\/master\/2022\/11-d8-user-authn\/dex-authenticator.yaml | sed \"s\/{{ __cluster__domain__ }}\/${DOMAINNAME}\/\" | kubectl create -f -<\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d <code>openldap-demo<\/code> \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f Pod <code>echoserver-dex-authenticator<\/code>:<\/p>\n<pre><code># kubectl -n openldap-demo get pod NAME                                                         READY   STATUS    RESTARTS   AGE echoserver-6944fb9c86-9flgh                     1\/1         Running   0                    5m echoserver-dex-authenticator-6bdd57cc95-wvbgk   2\/2     Running   1          2m ldap-6c949b6c6d-4zxg7                             1\/1          Running   0                    8m<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 DexAuthenticator. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/cr.html#dexauthenticator-v1-spec-allowedgroups\"><u>spec.allowedGroups<\/u><\/a>: \u043e\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0440\u0443\u043f\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0433\u0440\u0443\u043f\u043f\u0430 <code>developers<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>janedoe@example.com<\/code>: <\/p>\n<pre><code class=\"yaml\"># kubectl -n openldap-demo get dexauthenticator echoserver -o yaml apiVersion: deckhouse.io\/v1 kind: DexAuthenticator ... spec:   allowedGroups:   - developers ...<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c Ingess-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b OAuth2 Proxy.\u00a0<\/p>\n<p>\u0423\u043a\u0430\u0436\u0435\u043c \u0434\u0432\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 Ingress-\u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">kubectl -n openldap-demo annotate ingress echoserver 'nginx.ingress.kubernetes.io\/auth-signin=https:\/\/$host\/dex-authenticator\/sign_in' kubectl -n openldap-demo annotate ingress echoserver 'nginx.ingress.kubernetes.io\/auth-url=https:\/\/echoserver-dex-authenticator.openldap-demo.svc.cluster.local\/dex-authenticator\/auth'<\/code><\/pre>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u2014 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0445\u043e\u0434\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0445\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 LDAP-\u0441\u0435\u0440\u0432\u0435\u0440: <em>Log in with OpenLDAP Demo<\/em>. \u0412\u043e\u0439\u0434\u0435\u043c \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c <code>janedoe@example.com<\/code> (\u043f\u0430\u0440\u043e\u043b\u044c \u0432 LDAP: <code>foo<\/code>).<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e. \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u043e\u0439\u0442\u0438 \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u2014 <code>johndoe@example.com<\/code> (\u043f\u0430\u0440\u043e\u043b\u044c \u0432 LDAP: <code>bar<\/code>). \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443 <code>User not in allowed groups<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>johndoe<\/code> \u043d\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 <code>developers<\/code>.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0441\u043e\u0437\u0434\u0430\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 DexProvider. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430.\u00a0<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <em>\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/em>, \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c, \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes. \u041e\u0431 \u044d\u0442\u043e\u043c \u2014 \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h2>\n<p>\u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c custom resource <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/cr.html#user\"><u>User<\/u><\/a>.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>openldap-demo@example.com<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 <code>developers<\/code>, \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c <code>bar<\/code> \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0436\u0438\u0437\u043d\u0438 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u2014 24 \u0447\u0430\u0441\u0430:<\/p>\n<pre><code class=\"yaml\">kubectl create -f - &lt;&lt;\"EOF\" apiVersion: deckhouse.io\/v1 kind: User metadata:  name: openldap-demo spec:  email: openldap-demo@example.com  # echo \"bar\" | htpasswd -BinC 10 \"\" | cut -d: -f2  password: '$2a$10$spCnoGzDIRicDfiTmtImwu7sn2Csjj6oWRoLjNs6N\/bV3WDsxioui'  groups:    - developers  ttl: 24h EOF<\/code><\/pre>\n<blockquote>\n<p><em>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043f\u043e\u043b\u044e <\/em><code>password<\/code><em> \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u043e\u043b\u044f. \u041e\u043d\u0438 \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c.<\/em><\/p>\n<\/blockquote>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u043d, \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0439\u0442\u0438, \u0432\u044b\u0431\u0440\u0430\u0432 <em>Log in with Email<\/em>.<\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/\"><u>user-authn<\/u><\/a>. \u0422\u0430\u043a\u0436\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c <a href=\"https:\/\/deckhouse.ru\/documentation\/v1\/modules\/150-user-authn\/usage.html\"><u>\u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/u><\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<h2>\u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439<\/h2>\n<p>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\">kubectl delete dexprovider openldap-demo kubectl delete user openldap-demo kubectl delete ns openldap-demo<\/code><\/pre>\n<h2>P.S.<\/h2>\n<p>\u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/707422\/\">\u00ab<u>\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Deckhouse \u0432 Yandex Cloud<\/u>\u00bb<\/a>;\u00a0<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/682520\/\">\u00ab<u>\u0422\u0435\u0440\u043d\u0438\u0441\u0442\u044b\u0439 \u043f\u0443\u0442\u044c \u043a eBPF, \u0438\u043b\u0438 \u041a\u0430\u043a \u043c\u044b Cilium \u0432 Deckhouse \u0432\u043d\u0435\u0434\u0440\u044f\u043b\u0438<\/u>\u00bb<\/a>;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/news\/t\/597623\/\">\u00ab<u>Kubernetes-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Deckhouse \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u0415\u0434\u0438\u043d\u043e\u043c \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u041f\u041e<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/710010\/\"> https:\/\/habr.com\/ru\/company\/flant\/blog\/710010\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-343832","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/343832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=343832"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/343832\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=343832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=343832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=343832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}