{"id":867,"date":"2021-12-21T20:58:32","date_gmt":"2021-12-21T11:58:32","guid":{"rendered":"https:\/\/webclass.jp\/blog\/?p=867"},"modified":"2021-12-22T17:02:52","modified_gmt":"2021-12-22T08:02:52","slug":"docker-%e3%81%a7%e6%a4%9c%e8%a8%bc%e7%94%a8-cas-%e3%82%b5%e3%83%bc%e3%83%90","status":"publish","type":"post","link":"https:\/\/webclass.jp\/blog\/2021\/12\/21\/docker-%e3%81%a7%e6%a4%9c%e8%a8%bc%e7%94%a8-cas-%e3%82%b5%e3%83%bc%e3%83%90\/","title":{"rendered":"Docker \u3067\u691c\u8a3c\u7528 CAS \u30b5\u30fc\u30d0"},"content":{"rendered":"<p>CAS \u3068\u306e\u9023\u643a\u3092\u78ba\u8a8d\u3059\u308b\u306e\u306b\u3001Docker \u3067\u30b5\u30af\u30c3\u3068\u5efa\u3066\u3088\u3046\u3068\u601d\u3063\u305f\u3089\u601d\u3044\u306e\u307b\u304b\u624b\u3092\u713c\u3044\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<h2>\u3084\u308a\u305f\u3044\u3053\u3068<\/h2>\n<p>CAS \u3067SSO\u3059\u308b\u30b5\u30fc\u30d3\u30b9\u5074\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u691c\u67fb\u306e\u305f\u3081\u306b\u3001\u3068\u308a\u3042\u3048\u305a\u306eCAS\u30b5\u30fc\u30d0\u3092\u7acb\u3066\u3066\u4f7f\u3044\u305f\u3044\u3002\u7d30\u304b\u3044\u8a2d\u5b9a\u306f\u3044\u3089\u306a\u3044\u3002<\/p>\n<p>\u6614\u306f\u4eee\u60f3\u30de\u30b7\u30f3\u306b Tomcat \u5165\u308c\u3066\u52d5\u304b\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u4eca\u306a\u3089\u3082\u3046 Docker \u3067\u30b5\u30af\u30c3\u3068\u7acb\u3064\u306f\u305a\u3002\u3002\u3002<\/p>\n<h2>\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306e\u914d\u5e03\u72b6\u6cc1<\/h2>\n<p>\u672c\u5bb6\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3001\u3053\u306e\u7d20\u3063\u6c17\u306a\u3055\u304b\u3089\u3057\u3066\u3044\u3084\u306a\u4e88\u611f\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/apereo.github.io\/cas\/6.4.x\/installation\/Docker-Installation.html\">https:\/\/apereo.github.io\/cas\/6.4.x\/installation\/Docker-Installation.html<\/a><\/li>\n<\/ul>\n<p>\u672c\u5bb6\u306e\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3068\u3001\u30d3\u30eb\u30c9\u30bd\u30fc\u30b9<\/p>\n<ul>\n<li><a href=\"https:\/\/hub.docker.com\/r\/apereo\/cas\/\">https:\/\/hub.docker.com\/r\/apereo\/cas\/<\/a><\/li>\n<li>SRC1 : <a href=\"https:\/\/github.com\/apereo\/cas-webapp-docker\">https:\/\/github.com\/apereo\/cas-webapp-docker<\/a><\/li>\n<li>SRC2 : <a href=\"https:\/\/github.com\/apereo\/cas-overlay-template\/\">https:\/\/github.com\/apereo\/cas-overlay-template\/<\/a><\/li>\n<\/ul>\n<p>\u3044\u308d\u3044\u308d\u8a66\u3057\u305f\u7d50\u679c\u3001\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3092\u305d\u306e\u307e\u307e\u4f55\u3068\u304b\u52d5\u304b\u3057\u3066\u3082\u601d\u3063\u305f\u3088\u3046\u306b\u6271\u3048\u306a\u3044\u3002<\/p>\n<p>\u3053\u306e\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306f SRC1 \u3092\u30d3\u30eb\u30c9\u3057\u305f\u3082\u306e\u3067\u3001SRC1 \u306f gradle \u5b9f\u884c\u74b0\u5883\u3068 SRC2 \u3092\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306e\u4e2d\u306b\u5c55\u958b\u3057\u3066 gradle \u3067\u30d3\u30eb\u30c9\u3092\u3057\u3066\u3044\u308b\u3002\u305f\u3060\u3057\u3001SRC1 \u306f SRC2 \u306e\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6700\u5c0f\u9650\u3057\u304b\u8a2d\u5b9a\u3057\u3066\u304a\u3089\u305a\u3001\u5b9f\u7528\u6027\u306b\u96e3\u304c\u3042\u308b\u3002<\/p>\n<p>SRC2 \u304c\u672c\u547d\u3060\u304c\u3001SRC2 \u306b\u306f gradle \u306e\u30d3\u30eb\u30c9\u74b0\u5883\u69cb\u7bc9\u624b\u7d9a\u304d\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u3002\u305d\u308c\u3092\u66f8\u304f\u3068\u7d50\u5c40\u306f SRC1 \u3092\u5f15\u3063\u5f35\u308a\u51fa\u3059\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u3001SRC1 \u3092\u8abf\u6574\u3057\u3066\u30ab\u30b9\u30bf\u30e0\u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3053\u3068\u306b\u3059\u308b\u3002<\/p>\n<p>\u5ff5\u306e\u305f\u3081\u306b Vagrant \u3082\u63a2\u3057\u3066\u307f\u305f\u3051\u3069\u3044\u307e\u3044\u3061\u3067\u3057\u305f\u306e\u3067\u3001\u3084\u3063\u3071\u308a\u30b3\u30f3\u30c6\u30ca\u306e\u30d3\u30eb\u30c9\u3002<\/p>\n<h2>\u4e88\u5099\u77e5\u8b58\u3001\u524d\u63d0<\/h2>\n<ul>\n<li>CAS \u306e\u30d7\u30ed\u30c8\u30b3\u30eb\n<ul>\n<li><a href=\"https:\/\/apereo.github.io\/cas\/6.4.x\/protocol\/CAS-Protocol.html\">https:\/\/apereo.github.io\/cas\/6.4.x\/protocol\/CAS-Protocol.html<\/a><\/li>\n<\/ul>\n<\/li>\n<li>CAS \u30b5\u30fc\u30d0\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u4ee5\u4e0bURL\u3067\u52d5\u304b\u3059\u3002\u5909\u3048\u308b\u3068CAS\u30b5\u30fc\u30d0\u3084\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u306e\u8abf\u6574\u304c\u624b\u9593\u306a\u306e\u3067\u3002\n<ul>\n<li><a href=\"https:\/\/cas.example.org:8443\/cas\/\">https:\/\/cas.example.org:8443\/cas\/<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\u30a2\u30ab\u30a6\u30f3\u30c8\u8a8d\u8a3c\u306f\u3001CAS \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u8a2d\u5b9a\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u691c\u8a3c\u7528\u306b accept.authn.users=casuser::Mellon \u3068\u3044\u3046\u8a2d\u5b9a\u304c\u5165\u3063\u3066\u3044\u308b\u3002\u307e\u305a\u306f\u3053\u308c\u3067<\/li>\n<li>\u9023\u643a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8a8d\u8a3c\u3082\u3042\u308a\u3001SSO\u9023\u643a\u3067\u306f\u8a2d\u5b9a\u306f\u5fc5\u8981\u3002URL\u306e\u6b63\u898f\u8868\u73fe\u3067\u8a31\u53ef\u30eb\u30fc\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u3002\n<ul>\n<li><a href=\"https:\/\/apereo.github.io\/cas\/6.4.x\/services\/Service-Management.html\">https:\/\/apereo.github.io\/cas\/6.4.x\/services\/Service-Management.html<\/a><\/li>\n<li><a href=\"https:\/\/apereo.github.io\/cas\/6.4.x\/services\/Configuring-Service-Access-Strategy.html\">https:\/\/apereo.github.io\/cas\/6.4.x\/services\/Configuring-Service-Access-Strategy.html<\/a><\/li>\n<li>\u3053\u3053\u3067\u306f JSON \u3067ServiceRegistry\u3092\u767b\u9332\u3059\u308b\u3002<\/li>\n<li><a href=\"https:\/\/apereo.github.io\/cas\/6.4.x\/services\/JSON-Service-Management.html\">https:\/\/apereo.github.io\/cas\/6.4.x\/services\/JSON-Service-Management.html<\/a><\/li>\n<\/ul>\n<\/li>\n<li>serviceRegistry \u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u306b JSON \u3092\u4f7f\u3046\u306b\u306f\u3001Java\u306e\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8abf\u6574\u304c\u5fc5\u8981\n<ul>\n<li>\u30d3\u30eb\u30c9\u306b\u306f gradle \u3092\u4f7f\u3063\u3066\u3044\u308b\u3002\u4ee5\u4e0b\u306e\u8a18\u4e8b\u304c\u53c2\u8003\u306b\u306a\u3063\u305f\u3002<\/li>\n<li><a href=\"https:\/\/fawnoos.com\/2020\/11\/09\/cas63-gettingstarted-overlay\/\">https:\/\/fawnoos.com\/2020\/11\/09\/cas63-gettingstarted-overlay\/<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/66680275\/cant-define-services-in-cas-overlay-template-v-6-4-docker\">https:\/\/stackoverflow.com\/questions\/66680275\/cant-define-services-in-cas-overlay-template-v-6-4-docker<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\u691c\u8a3c\u3057\u305f\u74b0\u5883\n<ul>\n<li>MacOX 11.6 \u4e0a\u306e docker 20.10.11 <\/li>\n<li><a href=\"https:\/\/github.com\/apereo\/cas-webapp-docker\">https:\/\/github.com\/apereo\/cas-webapp-docker<\/a><\/li>\n<li>commit id : a2d664fd006d86f0bb09d65c2ffb0eeb25018fdf<\/li>\n<li><a href=\"https:\/\/github.com\/apereo\/cas-overlay-template\/\">https:\/\/github.com\/apereo\/cas-overlay-template\/<\/a><\/li>\n<li>commit id : bb994fda1afbe4f32dbe0522d7b1a86740a7ee5a<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u306f\u307e\u308a\u30dd\u30a4\u30f3\u30c8\u3001\u7279\u306b Java \u306e\u30d3\u30eb\u30c9\u74b0\u5883\u306b\u3064\u3044\u3066\u3042\u307e\u308a\u7d4c\u9a13\u306e\u7121\u3044\u65b9\u306f\u3001\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8abf\u6574\u3059\u308b\u3068\u3053\u308d\u304b\u3068\u601d\u3044\u307e\u3059\uff08\u79c1\u304c\u305d\u3046\u3067\u3057\u305f\uff09\u3002<\/p>\n<h2>\u30d3\u30eb\u30c9\u74b0\u5883\u306e\u7528\u610f<\/h2>\n<p>\u307e\u305a\u306f github.com\/apereo\/cas-webapp-docker \u3092\u30af\u30ed\u30fc\u30f3\u3057\u3066\u30d3\u30eb\u30c9\u306e\u6e96\u5099\u3092\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-shell\">git clone https:\/\/github.com\/apereo\/cas-webapp-docker.git\ncd cas-webapp-docker\n# git reset --hard a2d664fd006d86f0bb09d65c2ffb0eeb25018fdf<\/code><\/pre>\n<p>README.md \u306e SSL \u30bb\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u3053\u3053\u306f\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u7528\u3068\u5272\u308a\u5207\u3063\u3066\u3001\u9375\u3082PASS\u3082\u305d\u306e\u307e\u307e\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-shell\">keytool -genkeypair -alias cas -keyalg RSA -keypass changeit \\\n        -storepass changeit -keystore .\/thekeystore \\\n        -dname &quot;CN=cas.example.org,OU=Example,OU=Org,C=AU&quot; \\\n        -ext SAN=&quot;dns:example.org,dns:localhost,ip:127.0.0.1&quot;\n\nsudo su root -c &quot; echo &#039;127.0.0.1 cas.example.org&#039; &gt;&gt; \/etc\/hosts&quot;<\/code><\/pre>\n<p>\u5b9f\u969b\u306b\u4f7f\u3046\u306b\u306f\u307e\u3060\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u304c\u3001\u5ff5\u306e\u305f\u3081\u306b\u4e00\u5ea6\u30d3\u30eb\u30c9\u3057\u3066\u52d5\u304b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-shell\">.\/build.sh 6.4\n.\/run.sh 6.4<\/code><\/pre>\n<p>\u3046\u307e\u304f\u3044\u3051\u3070\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529b\u306b\u5927\u304d\u304f\u300cREADY\u300d\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002\uff08\u3053\u3053\u306e\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u3067\u306e\u8868\u793a\u3067\u306f\u5f62\u304c\u5d29\u308c\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff09\u3002<\/p>\n<pre><code>2021-12-21 05:02:57,689 INFO [org.apereo.cas.web.CasWebApplication] - &lt;&gt;\n2021-12-21 05:02:57,689 INFO [org.apereo.cas.web.CasWebApplication] - &lt;\n\n  ____  _____    _    ______   __\n |  _ \\| ____|  \/ \\  |  _ \\ \\ \/ \/\n | |_) |  _|   \/ _ \\ | | | \\ V \/ \n |  _ &lt;| |___ \/ ___ \\| |_| || |  \n |_| \\_\\_____\/_\/   \\_\\____\/ |_|  \n\n>\n2021-12-21 05:02:57,689 INFO [org.apereo.cas.web.CasWebApplication] - &lt;&gt;\n2021-12-21 05:20:05,860 INFO [org.apereo.cas.web.CasWebApplication] - &lt;Ready to process requests @ [2021-12-21T05:20:05.859Z]&gt;\n2021-12-21 05:20:05,916 INFO [org.apereo.cas.services.AbstractServicesManager] - &lt;Loaded [0] service(s) from [InMemoryServiceRegistry].&gt;<\/code><\/pre>\n<p>\u7279\u306b\u3001\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u306b\u30b3\u30d4\u30fc\u3057\u305f\u30ed\u30b0\u306e\u4e00\u756a\u6700\u5f8c\u306e\u884c\u3001<code> [org.apereo.cas.services.AbstractServicesManager] - &lt;Loaded [0] service(s) from [InMemoryServiceRegistry].&gt;<\/code> \u3068\u3044\u3046\u306e\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002\u3053\u308c\u306f\u3001Application ServiceRegistry \u306b\u767b\u9332\u304c\u306a\u3044\u3088\u3001\u3068\u8a00\u3063\u3066\u3044\u307e\u3059\u3002\u5f8c\u3067\u6539\u5584\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u72b6\u614b\u3067\u30d6\u30e9\u30a6\u30b6\u3067 <a href=\"https:\/\/cas.example.org:8443\/cas\/login\">https:\/\/cas.example.org:8443\/cas\/login<\/a>  \u3092\u958b\u304f\u3068\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u3092\u8868\u793a\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u304c\u3001\u5b9f\u969b\u306b\u306f\u8a3c\u660e\u66f8\u304c INVALID \u306a\u305f\u3081\u306b\u8b66\u544a\u304c\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8a3c\u660e\u66f8\u3092\u5410\u304d\u51fa\u3057\u3066\u8a31\u53ef\u30ea\u30b9\u30c8\u306b\u52a0\u3048\u308b\u304b\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u3044\u305f\u3068\u304d\u306b\u5f37\u5236\u7684\u306b\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n<pre><code>keytool -export -alias cas -keystore thekeystore -rfc -file cas-self.cert<\/code><\/pre>\n<p>\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u3068\u3001casuser \u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u8a8d\u8a3c\u306f\u6210\u529f\u3059\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/webclass.jp\/blog\/wp-content\/uploads\/2021\/12\/cas-server-login.png\" alt=\"\" \/><\/p>\n<h2>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u306e\u9023\u643a\u78ba\u8a8d<\/h2>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u306b\u3053\u306eCAS\u30b5\u30fc\u30d0\u3092\u767b\u9332\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li>\u30d6\u30e9\u30a6\u30b6\u306f\u3001CAS\u30b5\u30fc\u30d0\u3068\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u306e\u3069\u3061\u3089\u306b\u3082\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3053\u3068<\/li>\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u304c\u3053\u306eCAS\u30b5\u30fc\u30d0\u306b 8443:tcp \u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3053\u3068<\/li>\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u306e hosts \u30d5\u30a1\u30a4\u30eb\u306b\u3082 cas.example.org \u3092\u8db3\u3057\u3066\u304a\u304f\u3053\u3068<\/li>\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u306e CAS \u9023\u643a\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u8a3c\u660e\u66f8\u30c1\u30a7\u30c3\u30af\u3092\u7121\u8996\u3059\u308b\u8a2d\u5b9a\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068<\/li>\n<\/ul>\n<p>\u7279\u306b\u3001PHP\u306eCURL\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);\ncurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);<\/code><\/pre>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3067CAS\u8a8d\u8a3c\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001CAS\u30b5\u30fc\u30d0\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3055\u308c\u307e\u3059\u304c\u3001\u4ee5\u4e0b\u306e\u8868\u793a\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/webclass.jp\/blog\/wp-content\/uploads\/2021\/12\/cas-server-application-not-authorized.png\" alt=\"\" \/><\/p>\n<p>\u307e\u305f\u3001CAS\u30b5\u30fc\u30d0\u306e\u30ed\u30b0\u3067\u306f\u8a66\u3057\u305f\u76f4\u5f8c\u306b\u306f\u4ee5\u4e0b\u306e\u30ed\u30b0\u304c\u51fa\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<pre><code>2021-12-21 04:13:02,682 ERROR [org.apereo.cas.services.web.support.RegisteredServiceResponseHeadersEnforcementFilter] - &lt;Service unauthorized&gt;<\/code><\/pre>\n<p>\u3064\u307e\u308a\u3001\u8a31\u53ef\u30b5\u30fc\u30d3\u30b9\u30ea\u30b9\u30c8\u306e\u767b\u9332\u304c0\u3067\u3001\u3044\u307e\u8a66\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3082\u306f\u3058\u304b\u308c\u3066\u3044\u308b\u72b6\u614b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>Docker \u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3068 Application ServiceRegistry \u306e\u8a2d\u5b9a<\/h2>\n<p>\u3053\u3053\u304b\u3089\u306f\u3001\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3057\u3066\u3044\u308bDocker \u306e\u30d3\u30eb\u30c9\u30ad\u30c3\u30c8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u3001Application ServiceRegistry \u3092\u8a2d\u5b9a\u3057\u76f4\u3057\u305f\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u308a\u76f4\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f2\u3064\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u898f\u8ffd\u52a0\u3057\u307e\u3059\u30021\u3064\u306f cas \u30b5\u30fc\u30d0\u306e\u8d77\u52d5\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3001JSON\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u6709\u52b9\u306b\u6307\u5b9a\u3057\u307e\u3059\u30021\u3064\u306f\u30c6\u30b9\u30c8\u7528\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u306e\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30eb\u3067\u3001<a href=\"http:\/\/192.168.56\">http:\/\/192.168.56<\/a>.??\/ \u3067\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>etc\/cas\/config\/cas.properties<\/p>\n<pre><code>cas.server.name=https:\/\/cas.example.org:8443\ncas.server.prefix=${cas.server.name}\/cas\n\nlogging.config=file:\/etc\/cas\/config\/log4j2.xml\n\n# for json services ( need build option\ncas.service-registry.core.init-from-json=true\ncas.service-registry.json.watcher-enabled=true\ncas.service-registry.json.location=file:\/etc\/cas\/services\n#cas.service-registry.yaml.location=file:\/etc\/cas\/services\n\n# cas.authn.accept.enabled=false<\/code><\/pre>\n<p>etc\/cas\/services\/test-2.json<\/p>\n<pre><code class=\"language-json\">{\n     &quot;@class&quot; : &quot;org.apereo.cas.services.RegexRegisteredService&quot;,\n            &quot;id&quot;:2,\n            &quot;serviceId&quot;:&quot;http:\/\/192.168.*&quot;,\n            &quot;name&quot;:&quot;DEV&quot;,\n            &quot;description&quot;:&quot;dev&quot;,\n            &quot;allowedToProxy&quot;:true,\n            &quot;enabled&quot;:true,\n            &quot;ssoEnabled&quot;:true,\n            &quot;anonymousAccess&quot;:false,\n            &quot;allowedAttributes&quot;:[&quot;uid&quot;, &quot;mail&quot;]\n            &quot;extraAttributes&quot;:{\n                &quot;someCustomAttribute&quot;:&quot;Custom attribute value&quot;\n            },\n            &quot;evaluationOrder&quot;:2\n}<\/code><\/pre>\n<p>\u7d9a\u3044\u3066\u3001gradle \u306e\u30d3\u30eb\u30c9\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002\u3061\u3087\u3063\u3068\u9762\u5012\u306a\u306e\u3067\u3059\u304c\u3001\u4ee5\u4e0b\u306e build.grade \u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3057\u3066\u3001\u624b\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304d\u63db\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/apereo\/cas-overlay-template\/blob\/6.4\/build.gradle\">https:\/\/github.com\/apereo\/cas-overlay-template\/blob\/6.4\/build.gradle<\/a><\/li>\n<\/ul>\n<p>\u305d\u306e\u4e0a\u3067\u3001L930 \u304f\u3089\u3044\u306b\u3042\u308b dependencies \u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306b ServiceRegistry \u306e JOSN \u30b9\u30c8\u30ec\u30fc\u30b8\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8db3\u3057\u307e\u3059\u3002<code>${project.&#039;cas.version&#039;}<\/code> \u306e\u5909\u6570\u3082\u3001\u3053\u306e\u307e\u307e\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre><code>dependencies {\n    \/**\n     * CAS dependencies and modules may be listed here.\n     *\n     * ...\n     *\/\n     ...\n\n    \/* add *\/\n    implementation &quot;org.apereo.cas:cas-server-support-json-service-registry:${project.&#039;cas.version&#039;}&quot;\n}<\/code><\/pre>\n<p>\u7d9a\u3044\u3066\u3001Dockerfile \u3092\u7de8\u96c6\u3057\u307e\u3059\u30022\u30ab\u6240\u306f\u30d5\u30a1\u30a4\u30eb\u30b3\u30d4\u30fc\u64cd\u4f5c\u3092\u8ffd\u52a0\u3001gradle \u306e\u30d3\u30eb\u30c9\u30b3\u30de\u30f3\u30c9\u306f\u3001<code>.\/gradlew dependencies<\/code> \u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u30022\u30b9\u30c6\u30c3\u30d7\u306b\u5206\u89e3\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u307e\u3068\u3081\u3066\u3082\u304b\u307e\u3044\u307e\u305b\u3093\u3002<\/p>\n<pre><code>FROM centos:centos7\n\nMAINTAINER Apereo Foundation\n\nENV PATH=$PATH:$JRE_HOME\/bin\nARG cas_version\n\nRUN yum -y install wget tar unzip git \\\n    &amp;&amp; yum -y clean all\n\n# Download Azul Java, verify the hash, and install \\\nRUN set -x; \\\n    java_version=11.0.3; \\\n    zulu_version=11.31.11-ca; \\\n    java_hash=20218b15ae5ef1318aed1a3d5dde3219; \\\n    cd \/ \\\n    &amp;&amp; wget http:\/\/cdn.azul.com\/zulu\/bin\/zulu$zulu_version-jdk$java_version-linux_x64.tar.gz \\\n    &amp;&amp; echo &quot;$java_hash  zulu$zulu_version-jdk$java_version-linux_x64.tar.gz&quot; | md5sum -c - \\\n    &amp;&amp; tar -zxvf zulu$zulu_version-jdk$java_version-linux_x64.tar.gz -C \/opt \\\n    &amp;&amp; rm zulu$zulu_version-jdk$java_version-linux_x64.tar.gz \\\n    &amp;&amp; ln -s \/opt\/zulu$zulu_version-jdk$java_version-linux_x64\/ \/opt\/java-home;\n\n# Download the CAS overlay project \\\nRUN cd \/ \\\n    &amp;&amp; git clone --depth 1 --single-branch -b $cas_version https:\/\/github.com\/apereo\/cas-overlay-template.git cas-overlay \\\n    &amp;&amp; mkdir -p \/etc\/cas \\\n    &amp;&amp; mkdir -p cas-overlay\/bin;\n\nCOPY thekeystore \/etc\/cas\/\nCOPY bin\/*.* cas-overlay\/\nCOPY etc\/cas\/config\/*.* \/cas-overlay\/etc\/cas\/config\/\nCOPY etc\/cas\/services\/*.* \/cas-overlay\/etc\/cas\/services\/\n# \u8ffd\u8a18\nCOPY build.gradle \/cas-overlay\/build.gradle\n\nRUN chmod 750 cas-overlay\/gradlew \\\n    &amp;&amp; chmod 750 cas-overlay\/*.sh \\\n    &amp;&amp; chmod 750 \/opt\/java-home\/bin\/java;\n\nEXPOSE 8080 8443\n\nWORKDIR \/cas-overlay\n\nENV JAVA_HOME \/opt\/java-home\nENV PATH $PATH:$JAVA_HOME\/bin:.\n\n# \u66f8\u304d\u63db\u3048\nRUN mkdir -p ~\/.gradle  &amp;&amp; echo &quot;org.gradle.daemon=false&quot; &gt;&gt; ~\/.gradle\/gradle.properties\nRUN .\/gradlew dependencies &amp;&amp; .\/gradlew clean build --parallel \\\n    &amp;&amp; rm -rf \/root\/.gradle\n\n# \u8ffd\u8a18\nRUN mkdir -p \/etc\/cas\/config &amp;&amp; mkdir -p \/etc\/cas\/services &amp;&amp; cp etc\/cas\/config\/* \/etc\/cas\/config\/ &amp;&amp; cp etc\/cas\/services\/* \/etc\/cas\/services\/\n\nCMD [&quot;\/cas-overlay\/run-cas.sh&quot;]<\/code><\/pre>\n<p>\u3042\u3089\u305f\u3081\u3066\u30d3\u30eb\u30c9\u3068\u5b9f\u884c\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-shell\">.\/build.sh 6.4\n.\/run.sh 6.4<\/code><\/pre>\n<p>\u3082\u3057 JSON \u306e\u30b5\u30fc\u30d3\u30b9\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30eb\u3092\u30ed\u30fc\u30c9\u3067\u304d\u3066\u3044\u308c\u3070\u3001\u300cREADY\u300d\u306e\u5f8c\u306b\u4ee5\u4e0b\u306e\u30ed\u30b0\u304c\u51fa\u307e\u3059\u3002<code> [org.apereo.cas.services.AbstractServicesManager] - &lt;Loaded [1] service(s) from [JsonServiceRegistry].&gt;<\/code> \u3068\u306a\u3063\u3066\u3044\u308c\u3070\u3001JSON \u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5b9a\u7fa9\u3092\u30ed\u30fc\u30c9\u3059\u308b\u306e\u306b\u6210\u529f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code>2021-12-21 09:07:28,348 INFO [org.apereo.cas.web.CasWebApplication] - &lt;Ready to process requests @ [2021-12-21T09:07:28.342Z]&gt;\n2021-12-21 09:07:28,780 INFO [org.apereo.cas.services.AbstractServicesManager] - &lt;Loaded [1] service(s) from [JsonServiceRegistry].&gt;<\/code><\/pre>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30eb\u306eURL\u6b63\u898f\u8868\u73fe\u3068\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eURL\u304c\u30de\u30c3\u30c1\u3057\u3066\u3044\u308c\u3070\u3001SSO\u8a8d\u8a3c\u3057\u305f\u3068\u304d\u306b\u7121\u4e8b\u306b CAS \u306e\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u306b\u6210\u529f\u3059\u308b\u3068\u3001CAS\u30b5\u30fc\u30d0\u306f\u30c1\u30b1\u30c3\u30c8\u3092\u767a\u884c\u3057\u3066\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u307e\u3059\u3002\u30ed\u30b0\u306f\u4ee5\u4e0b\u304c\u6b8b\u308a\u307e\u3059\u3002<\/p>\n<pre><code>2021-12-21 09:39:39,055 INFO [org.apereo.cas.DefaultCentralAuthenticationService] - &lt;Granted service ticket [ST-11-Li75-erdbw7sPZ5vdnW5QG1IcAY-66a57e874b0d] for service [http:\/\/192.168.56.76\/login.php?auth_mode=CAS] and principal [casuser]&gt;\n2021-12-21 09:39:39,055 INFO [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - &lt;Audit trail record BEGIN\n=============================================================\nWHO: casuser\nWHAT: {service=http:\/\/192.168.56.76\/login.php?auth_mode=CAS, return=ST-11-Li75-erdbw7sPZ5vdnW5QG1IcAY-66a57e874b0d}\nACTION: SERVICE_TICKET_CREATED\nAPPLICATION: CAS\nWHEN: Tue Dec 21 09:39:39 UTC 2021\nCLIENT IP ADDRESS: 172.17.0.1\nSERVER IP ADDRESS: 172.17.0.2\n=============================================================<\/code><\/pre>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u304c\u30ea\u30c0\u30a4\u30ec\u30af\u30c8URL\u3088\u308a\u8a8d\u8a3c\u30c1\u30b1\u30c3\u30c8\u3092\u53d7\u3051\u53d6\u308b\u3068\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u304b\u3089CAS\u30b5\u30fc\u30d0\u306b\u30c1\u30b1\u30c3\u30c8\u306eValidation\u306e\u554f\u3044\u5408\u308f\u305b\u3092\u884c\u3044\u307e\u3059\u3002Validation \u306b\u6210\u529f\u3059\u308b\u3068\u3001CAS\u30b5\u30fc\u30d0\u306b\u306f\u4ee5\u4e0b\u306e\u30ed\u30b0\u304c\u6b8b\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3067\u306f\u30e6\u30fc\u30b6\u540d\u306a\u3069\u5c5e\u6027\u60c5\u5831\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059\u3002<\/p>\n<pre><code>2021-12-21 09:39:39,159 INFO [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - &lt;Audit trail record BEGIN\n=============================================================\nWHO: casuser\nWHAT: {ticket=ST-11-Li75-erdbw7sPZ5vdnW5QG1IcAY-66a57e874b0d, service=http:\/\/192.168.56.76\/login.php?auth_mode=CAS}\nACTION: SERVICE_TICKET_VALIDATE_SUCCESS\nAPPLICATION: CAS\nWHEN: Tue Dec 21 09:39:39 UTC 2021\nCLIENT IP ADDRESS: 172.17.0.1\nSERVER IP ADDRESS: 172.17.0.2\n=============================================================<\/code><\/pre>\n<h2>\u4eca\u5f8c<\/h2>\n<p>Java \u306e\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u306f\u3042\u307e\u308a\u4f7f\u3063\u305f\u3053\u3068\u304c\u306a\u3044\u306e\u3067\u3001gradle \u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u8a18\u5165\u4f4d\u7f6e\u3092\u898b\u3064\u3051\u308b\u306e\u306b\u601d\u3044\u306e\u307b\u304b\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u3059\u304c\u3001\u3053\u308c\u3067\u3059\u3050\u306b\u691c\u8a3c\u30b5\u30fc\u30d0\u304c\u7528\u610f\u3067\u304d\u307e\u3059\u3002CAS\u30b5\u30fc\u30d0\u306e\u30b9\u30bf\u30d6\u3092\u66f8\u304f\u307e\u3067\u306e\u9593\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u66f4\u65b0\u3084\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u306a\u3069\u3067\u983c\u3082\u3057\u304f\u52d5\u3044\u3066\u304f\u308c\u308b\u306e\u3092\u671f\u5f85\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CAS \u3068\u306e\u9023\u643a\u3092\u78ba\u8a8d\u3059\u308b\u306e\u306b\u3001Docker \u3067\u30b5\u30af\u30c3\u3068\u5efa\u3066\u3088\u3046\u3068\u601d\u3063\u305f\u3089\u601d\u3044\u306e\u307b\u304b\u624b\u3092\u713c\u3044\u305f\u306e\u3067\u30e1\u30e2\u3002 \u3084\u308a\u305f\u3044\u3053\u3068 CAS \u3067SSO\u3059\u308b\u30b5\u30fc\u30d3\u30b9\u5074\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u691c\u67fb\u306e\u305f\u3081\u306b\u3001\u3068\u308a\u3042\u3048\u305a\u306eCAS\u30b5\u30fc\u30d0\u3092\u7acb\u3066\u3066\u4f7f\u3044\u305f\u3044\u3002\u7d30 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59,48,5],"tags":[],"class_list":["post-867","post","type-post","status-publish","format-standard","hentry","category-docker","category-48","category-5"],"_links":{"self":[{"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/posts\/867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/comments?post=867"}],"version-history":[{"count":5,"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/posts\/867\/revisions"}],"predecessor-version":[{"id":874,"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/posts\/867\/revisions\/874"}],"wp:attachment":[{"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/media?parent=867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/categories?post=867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webclass.jp\/blog\/wp-json\/wp\/v2\/tags?post=867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}