sso72-https.json 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass" : "icon-sso",
  7. "tags" : "sso,keycloak,jboss,hidden",
  8. "version": "1.4.14",
  9. "openshift.io/display-name": "Red Hat Single Sign-On 7.2 (Ephemeral with passthrough TLS)",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example RH-SSO 7 application. For more information about using this template, see https://github.com/jboss-openshift/application-templates.",
  12. "template.openshift.io/long-description": "This template defines resources needed to develop Red Hat Single Sign-On 7.2 server based deployment, securing RH-SSO communication using passthrough TLS.",
  13. "template.openshift.io/documentation-url": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/",
  14. "template.openshift.io/support-url": "https://access.redhat.com"
  15. },
  16. "name": "sso72-https"
  17. },
  18. "labels": {
  19. "template": "sso72-https",
  20. "xpaas": "1.4.14"
  21. },
  22. "message": "A new RH-SSO service has been created in your project. The admin username/password for accessing the master realm via the RH-SSO console is ${SSO_ADMIN_USERNAME}/${SSO_ADMIN_PASSWORD}. Please be sure to create the following secrets: \"${HTTPS_SECRET}\" containing the ${HTTPS_KEYSTORE} file used for serving secure content; \"${JGROUPS_ENCRYPT_SECRET}\" containing the ${JGROUPS_ENCRYPT_KEYSTORE} file used for securing JGroups communications; \"${SSO_TRUSTSTORE_SECRET}\" containing the ${SSO_TRUSTSTORE} file used for securing RH-SSO requests.",
  23. "parameters": [
  24. {
  25. "displayName": "Application Name",
  26. "description": "The name for the application.",
  27. "name": "APPLICATION_NAME",
  28. "value": "sso",
  29. "required": true
  30. },
  31. {
  32. "displayName": "Custom http Route Hostname",
  33. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
  34. "name": "HOSTNAME_HTTP",
  35. "value": "",
  36. "required": false
  37. },
  38. {
  39. "displayName": "Custom https Route Hostname",
  40. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
  41. "name": "HOSTNAME_HTTPS",
  42. "value": "",
  43. "required": false
  44. },
  45. {
  46. "displayName": "Server Keystore Secret Name",
  47. "description": "The name of the secret containing the keystore file",
  48. "name": "HTTPS_SECRET",
  49. "value": "sso-app-secret",
  50. "required": false
  51. },
  52. {
  53. "displayName": "Server Keystore Filename",
  54. "description": "The name of the keystore file within the secret",
  55. "name": "HTTPS_KEYSTORE",
  56. "value": "keystore.jks",
  57. "required": false
  58. },
  59. {
  60. "displayName": "Server Keystore Type",
  61. "description": "The type of the keystore file (JKS or JCEKS)",
  62. "name": "HTTPS_KEYSTORE_TYPE",
  63. "value": "",
  64. "required": false
  65. },
  66. {
  67. "displayName": "Server Certificate Name",
  68. "description": "The name associated with the server certificate (e.g. jboss)",
  69. "name": "HTTPS_NAME",
  70. "value": "",
  71. "required": false
  72. },
  73. {
  74. "displayName": "Server Keystore Password",
  75. "description": "The password for the keystore and certificate (e.g. mykeystorepass)",
  76. "name": "HTTPS_PASSWORD",
  77. "value": "",
  78. "required": false
  79. },
  80. {
  81. "displayName": "Datasource Minimum Pool Size",
  82. "description": "Sets xa-pool/min-pool-size for the configured datasource.",
  83. "name": "DB_MIN_POOL_SIZE",
  84. "required": false
  85. },
  86. {
  87. "displayName": "Datasource Maximum Pool Size",
  88. "description": "Sets xa-pool/max-pool-size for the configured datasource.",
  89. "name": "DB_MAX_POOL_SIZE",
  90. "required": false
  91. },
  92. {
  93. "displayName": "Datasource Transaction Isolation",
  94. "description": "Sets transaction-isolation for the configured datasource.",
  95. "name": "DB_TX_ISOLATION",
  96. "required": false
  97. },
  98. {
  99. "displayName": "JGroups Secret Name",
  100. "description": "The name of the secret containing the keystore file",
  101. "name": "JGROUPS_ENCRYPT_SECRET",
  102. "value": "sso-app-secret",
  103. "required": false
  104. },
  105. {
  106. "displayName": "JGroups Keystore Filename",
  107. "description": "The name of the keystore file within the secret",
  108. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  109. "value": "jgroups.jceks",
  110. "required": false
  111. },
  112. {
  113. "displayName": "JGroups Certificate Name",
  114. "description": "The name associated with the server certificate (e.g. secret-key)",
  115. "name": "JGROUPS_ENCRYPT_NAME",
  116. "value": "",
  117. "required": false
  118. },
  119. {
  120. "displayName": "JGroups Keystore Password",
  121. "description": "The password for the keystore and certificate (e.g. password)",
  122. "name": "JGROUPS_ENCRYPT_PASSWORD",
  123. "value": "",
  124. "required": false
  125. },
  126. {
  127. "displayName": "JGroups Cluster Password",
  128. "description": "JGroups cluster password",
  129. "name": "JGROUPS_CLUSTER_PASSWORD",
  130. "from": "[a-zA-Z0-9]{8}",
  131. "generate": "expression",
  132. "required": true
  133. },
  134. {
  135. "displayName": "ImageStream Namespace",
  136. "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
  137. "name": "IMAGE_STREAM_NAMESPACE",
  138. "value": "openshift",
  139. "required": true
  140. },
  141. {
  142. "displayName": "RH-SSO Administrator Username",
  143. "description": "RH-SSO Server administrator username",
  144. "name": "SSO_ADMIN_USERNAME",
  145. "from": "[a-zA-Z0-9]{8}",
  146. "generate": "expression",
  147. "required": true
  148. },
  149. {
  150. "displayName": "RH-SSO Administrator Password",
  151. "description": "RH-SSO Server administrator password",
  152. "name": "SSO_ADMIN_PASSWORD",
  153. "from": "[a-zA-Z0-9]{8}",
  154. "generate": "expression",
  155. "required": true
  156. },
  157. {
  158. "displayName": "RH-SSO Realm",
  159. "description": "Realm to be created in the RH-SSO server (e.g. demorealm).",
  160. "name": "SSO_REALM",
  161. "value": "",
  162. "required": false
  163. },
  164. {
  165. "displayName": "RH-SSO Service Username",
  166. "description": "The username used to access the RH-SSO service. This is used by clients to create the appliction client(s) within the specified RH-SSO realm.",
  167. "name": "SSO_SERVICE_USERNAME",
  168. "value": "",
  169. "required": false
  170. },
  171. {
  172. "displayName": "RH-SSO Service Password",
  173. "description": "The password for the RH-SSO service user.",
  174. "name": "SSO_SERVICE_PASSWORD",
  175. "value": "",
  176. "required": false
  177. },
  178. {
  179. "displayName": "RH-SSO Trust Store",
  180. "description": "The name of the truststore file within the secret (e.g. truststore.jks)",
  181. "name": "SSO_TRUSTSTORE",
  182. "value": "",
  183. "required": false
  184. },
  185. {
  186. "displayName": "RH-SSO Trust Store Password",
  187. "description": "The password for the truststore and certificate (e.g. mykeystorepass)",
  188. "name": "SSO_TRUSTSTORE_PASSWORD",
  189. "value": "",
  190. "required": false
  191. },
  192. {
  193. "displayName": "RH-SSO Trust Store Secret",
  194. "description": "The name of the secret containing the truststore file (e.g. truststore-secret). Used for volume secretName",
  195. "name": "SSO_TRUSTSTORE_SECRET",
  196. "value": "sso-app-secret",
  197. "required": false
  198. },
  199. {
  200. "displayName": "Container Memory Limit",
  201. "description": "Container memory limit.",
  202. "name": "MEMORY_LIMIT",
  203. "value": "1Gi",
  204. "required": false
  205. }
  206. ],
  207. "objects": [
  208. {
  209. "kind": "Service",
  210. "apiVersion": "v1",
  211. "spec": {
  212. "ports": [
  213. {
  214. "port": 8080,
  215. "targetPort": 8080
  216. }
  217. ],
  218. "selector": {
  219. "deploymentConfig": "${APPLICATION_NAME}"
  220. }
  221. },
  222. "metadata": {
  223. "name": "${APPLICATION_NAME}",
  224. "labels": {
  225. "application": "${APPLICATION_NAME}"
  226. },
  227. "annotations": {
  228. "description": "The web server's http port."
  229. }
  230. }
  231. },
  232. {
  233. "kind": "Service",
  234. "apiVersion": "v1",
  235. "spec": {
  236. "ports": [
  237. {
  238. "port": 8443,
  239. "targetPort": 8443
  240. }
  241. ],
  242. "selector": {
  243. "deploymentConfig": "${APPLICATION_NAME}"
  244. }
  245. },
  246. "metadata": {
  247. "name": "secure-${APPLICATION_NAME}",
  248. "labels": {
  249. "application": "${APPLICATION_NAME}"
  250. },
  251. "annotations": {
  252. "description": "The web server's https port."
  253. }
  254. }
  255. },
  256. {
  257. "kind": "Service",
  258. "apiVersion": "v1",
  259. "spec": {
  260. "clusterIP": "None",
  261. "ports": [
  262. {
  263. "name": "ping",
  264. "port": 8888
  265. }
  266. ],
  267. "selector": {
  268. "deploymentConfig": "${APPLICATION_NAME}"
  269. }
  270. },
  271. "metadata": {
  272. "name": "${APPLICATION_NAME}-ping",
  273. "labels": {
  274. "application": "${APPLICATION_NAME}"
  275. },
  276. "annotations": {
  277. "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true",
  278. "description": "The JGroups ping port for clustering."
  279. }
  280. }
  281. },
  282. {
  283. "kind": "Route",
  284. "apiVersion": "v1",
  285. "id": "${APPLICATION_NAME}-http",
  286. "metadata": {
  287. "name": "${APPLICATION_NAME}",
  288. "labels": {
  289. "application": "${APPLICATION_NAME}"
  290. },
  291. "annotations": {
  292. "description": "Route for application's http service."
  293. }
  294. },
  295. "spec": {
  296. "host": "${HOSTNAME_HTTP}",
  297. "to": {
  298. "name": "${APPLICATION_NAME}"
  299. }
  300. }
  301. },
  302. {
  303. "kind": "Route",
  304. "apiVersion": "v1",
  305. "id": "${APPLICATION_NAME}-https",
  306. "metadata": {
  307. "name": "secure-${APPLICATION_NAME}",
  308. "labels": {
  309. "application": "${APPLICATION_NAME}"
  310. },
  311. "annotations": {
  312. "description": "Route for application's https service."
  313. }
  314. },
  315. "spec": {
  316. "host": "${HOSTNAME_HTTPS}",
  317. "to": {
  318. "name": "secure-${APPLICATION_NAME}"
  319. },
  320. "tls": {
  321. "termination": "passthrough"
  322. }
  323. }
  324. },
  325. {
  326. "kind": "DeploymentConfig",
  327. "apiVersion": "v1",
  328. "metadata": {
  329. "name": "${APPLICATION_NAME}",
  330. "labels": {
  331. "application": "${APPLICATION_NAME}"
  332. }
  333. },
  334. "spec": {
  335. "strategy": {
  336. "type": "Recreate"
  337. },
  338. "triggers": [
  339. {
  340. "type": "ImageChange",
  341. "imageChangeParams": {
  342. "automatic": true,
  343. "containerNames": [
  344. "${APPLICATION_NAME}"
  345. ],
  346. "from": {
  347. "kind": "ImageStreamTag",
  348. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  349. "name": "redhat-sso72-openshift:1.2"
  350. }
  351. }
  352. },
  353. {
  354. "type": "ConfigChange"
  355. }
  356. ],
  357. "replicas": 1,
  358. "selector": {
  359. "deploymentConfig": "${APPLICATION_NAME}"
  360. },
  361. "template": {
  362. "metadata": {
  363. "name": "${APPLICATION_NAME}",
  364. "labels": {
  365. "deploymentConfig": "${APPLICATION_NAME}",
  366. "application": "${APPLICATION_NAME}"
  367. }
  368. },
  369. "spec": {
  370. "terminationGracePeriodSeconds": 75,
  371. "containers": [
  372. {
  373. "name": "${APPLICATION_NAME}",
  374. "image": "${APPLICATION_NAME}",
  375. "imagePullPolicy": "Always",
  376. "resources": {
  377. "limits": {
  378. "memory": "${MEMORY_LIMIT}"
  379. }
  380. },
  381. "volumeMounts": [
  382. {
  383. "name": "eap-keystore-volume",
  384. "mountPath": "/etc/eap-secret-volume",
  385. "readOnly": true
  386. },
  387. {
  388. "name": "eap-jgroups-keystore-volume",
  389. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  390. "readOnly": true
  391. },
  392. {
  393. "name": "sso-truststore-volume",
  394. "mountPath": "/etc/sso-secret-volume",
  395. "readOnly": true
  396. }
  397. ],
  398. "livenessProbe": {
  399. "exec": {
  400. "command": [
  401. "/bin/bash",
  402. "-c",
  403. "/opt/eap/bin/livenessProbe.sh"
  404. ]
  405. },
  406. "initialDelaySeconds": 60
  407. },
  408. "readinessProbe": {
  409. "exec": {
  410. "command": [
  411. "/bin/bash",
  412. "-c",
  413. "/opt/eap/bin/readinessProbe.sh"
  414. ]
  415. }
  416. },
  417. "ports": [
  418. {
  419. "name": "jolokia",
  420. "containerPort": 8778,
  421. "protocol": "TCP"
  422. },
  423. {
  424. "name": "http",
  425. "containerPort": 8080,
  426. "protocol": "TCP"
  427. },
  428. {
  429. "name": "https",
  430. "containerPort": 8443,
  431. "protocol": "TCP"
  432. },
  433. {
  434. "name": "ping",
  435. "containerPort": 8888,
  436. "protocol": "TCP"
  437. }
  438. ],
  439. "env": [
  440. {
  441. "name": "DB_MIN_POOL_SIZE",
  442. "value": "${DB_MIN_POOL_SIZE}"
  443. },
  444. {
  445. "name": "DB_MAX_POOL_SIZE",
  446. "value": "${DB_MAX_POOL_SIZE}"
  447. },
  448. {
  449. "name": "DB_TX_ISOLATION",
  450. "value": "${DB_TX_ISOLATION}"
  451. },
  452. {
  453. "name": "JGROUPS_PING_PROTOCOL",
  454. "value": "openshift.DNS_PING"
  455. },
  456. {
  457. "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
  458. "value": "${APPLICATION_NAME}-ping"
  459. },
  460. {
  461. "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
  462. "value": "8888"
  463. },
  464. {
  465. "name": "HTTPS_KEYSTORE_DIR",
  466. "value": "/etc/eap-secret-volume"
  467. },
  468. {
  469. "name": "HTTPS_KEYSTORE",
  470. "value": "${HTTPS_KEYSTORE}"
  471. },
  472. {
  473. "name": "HTTPS_KEYSTORE_TYPE",
  474. "value": "${HTTPS_KEYSTORE_TYPE}"
  475. },
  476. {
  477. "name": "HTTPS_NAME",
  478. "value": "${HTTPS_NAME}"
  479. },
  480. {
  481. "name": "HTTPS_PASSWORD",
  482. "value": "${HTTPS_PASSWORD}"
  483. },
  484. {
  485. "name": "JGROUPS_ENCRYPT_SECRET",
  486. "value": "${JGROUPS_ENCRYPT_SECRET}"
  487. },
  488. {
  489. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  490. "value": "/etc/jgroups-encrypt-secret-volume"
  491. },
  492. {
  493. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  494. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  495. },
  496. {
  497. "name": "JGROUPS_ENCRYPT_NAME",
  498. "value": "${JGROUPS_ENCRYPT_NAME}"
  499. },
  500. {
  501. "name": "JGROUPS_ENCRYPT_PASSWORD",
  502. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  503. },
  504. {
  505. "name": "JGROUPS_CLUSTER_PASSWORD",
  506. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  507. },
  508. {
  509. "name": "SSO_ADMIN_USERNAME",
  510. "value": "${SSO_ADMIN_USERNAME}"
  511. },
  512. {
  513. "name": "SSO_ADMIN_PASSWORD",
  514. "value": "${SSO_ADMIN_PASSWORD}"
  515. },
  516. {
  517. "name": "SSO_REALM",
  518. "value": "${SSO_REALM}"
  519. },
  520. {
  521. "name": "SSO_SERVICE_USERNAME",
  522. "value": "${SSO_SERVICE_USERNAME}"
  523. },
  524. {
  525. "name": "SSO_SERVICE_PASSWORD",
  526. "value": "${SSO_SERVICE_PASSWORD}"
  527. },
  528. {
  529. "name": "SSO_TRUSTSTORE",
  530. "value": "${SSO_TRUSTSTORE}"
  531. },
  532. {
  533. "name": "SSO_TRUSTSTORE_DIR",
  534. "value": "/etc/sso-secret-volume"
  535. },
  536. {
  537. "name": "SSO_TRUSTSTORE_PASSWORD",
  538. "value": "${SSO_TRUSTSTORE_PASSWORD}"
  539. }
  540. ]
  541. }
  542. ],
  543. "volumes": [
  544. {
  545. "name": "eap-keystore-volume",
  546. "secret": {
  547. "secretName": "${HTTPS_SECRET}"
  548. }
  549. },
  550. {
  551. "name": "eap-jgroups-keystore-volume",
  552. "secret": {
  553. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  554. }
  555. },
  556. {
  557. "name": "sso-truststore-volume",
  558. "secret": {
  559. "secretName": "${SSO_TRUSTSTORE_SECRET}"
  560. }
  561. }
  562. ]
  563. }
  564. }
  565. }
  566. }
  567. ]
  568. }