|
|
@@ -22,86 +22,188 @@
|
|
|
</div>
|
|
|
<fieldset id="passport-saml-hide-when-disabled" {%if !isSamlEnabled %}style="display: none;"{% endif %}>
|
|
|
|
|
|
- <div class="form-group">
|
|
|
- <label for="settingForm[security:passport-saml:entryPoint]" class="col-xs-3 control-label">{{ t("security_setting.SAML.entry_point") }}</label>
|
|
|
- <div class="col-xs-6">
|
|
|
- <input id="settingForm[security:passport-saml:entryPoint]" class="form-control"
|
|
|
- type="text"
|
|
|
- name="settingForm[security:passport-saml:entryPoint]"
|
|
|
- value="{{ getConfig('crowi', 'security:passport-saml:entryPoint') || '' }}">
|
|
|
- <p class="help-block">
|
|
|
- <small>
|
|
|
- {{ t("security_setting.Use env var if empty", "SAML_ENTRY_POINT") }}
|
|
|
- </small>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="form-group">
|
|
|
- <label class="col-xs-3 control-label">{{ t("security_setting.callback_URL") }}</label>
|
|
|
- <div class="col-xs-6">
|
|
|
- <input class="form-control"
|
|
|
- type="text"
|
|
|
- value="{% if settingForm['app:siteUrl'] %}{{ settingForm['app:siteUrl'] }}{% else %}[INVALID] {% endif %}/passport/saml/callback"
|
|
|
- readonly>
|
|
|
- <p class="help-block small">{{ t("security_setting.desc_of_callback_URL", 'SAML Identity') }}</p>
|
|
|
- {% if !settingForm['app:siteUrl'] %}
|
|
|
- <div class="alert alert-danger">
|
|
|
- <i class="icon-exclamation"></i> {{ t("security_setting.alert_siteUrl_is_not_set", '<a href="/admin/app">' + t('App settings') + '<i class="icon-login"></i></a>') }}
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="form-group">
|
|
|
- <label for="settingForm[security:passport-saml:issuer]" class="col-xs-3 control-label">{{ t("security_setting.SAML.issuer") }}</label>
|
|
|
- <div class="col-xs-6">
|
|
|
- <input id="settingForm[security:passport-saml:issuer]" class="form-control"
|
|
|
- type="text"
|
|
|
- name="settingForm[security:passport-saml:issuer]"
|
|
|
- value="{{ settingForm['security:passport-saml:issuer'] || '' }}">
|
|
|
- <p class="help-block">
|
|
|
- <small>
|
|
|
- {{ t("security_setting.Use env var if empty", "SAML_ISSUER") }}
|
|
|
- </small>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <h4>Basic Settings</h4>
|
|
|
+ <table class="table">
|
|
|
+ <thead>
|
|
|
+ <tr><th></th><th>Database</th><th>Environment variables</th></tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>{{ t("security_setting.SAML.entry_point") }}</th>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ name="settingForm[security:passport-saml:entryPoint]"
|
|
|
+ value="{{ getConfigFromDB('crowi', 'security:passport-saml:entryPoint') || '' }}">
|
|
|
+ <p class="help-block">
|
|
|
+ <small>
|
|
|
+ {{ t("security_setting.Use env var if empty", "SAML_ENTRY_POINT") }}
|
|
|
+ </small>
|
|
|
+ </p>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ value="{{ getConfigFromEnvVars('crowi', 'security:passport-saml:entryPoint') || '' }}"
|
|
|
+ readonly>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>{{ t("security_setting.callback_URL") }}</th>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ value="{% if settingForm['app:siteUrl'] %}{{ settingForm['app:siteUrl'] }}{% else %}[INVALID] {% endif %}/passport/saml/callback"
|
|
|
+ readonly>
|
|
|
+ <p class="help-block small">{{ t("security_setting.desc_of_callback_URL", 'SAML Identity') }}</p>
|
|
|
+ {% if !settingForm['app:siteUrl'] %}
|
|
|
+ <div class="alert alert-danger">
|
|
|
+ <i class="icon-exclamation"></i> {{ t("security_setting.alert_siteUrl_is_not_set", '<a href="/admin/app">' + t('App settings') + '<i class="icon-login"></i></a>') }}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ Deprecated
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>{{ t("security_setting.SAML.issuer") }}</th>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ name="settingForm[security:passport-saml:issuer]"
|
|
|
+ value="{{ getConfigFromDB('crowi', 'security:passport-saml:issuer') || '' }}">
|
|
|
+ <p class="help-block">
|
|
|
+ <small>
|
|
|
+ {{ t("security_setting.Use env var if empty", "SAML_ISSUER") }}
|
|
|
+ </small>
|
|
|
+ </p>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ value="{{ getConfigFromEnvVars('crowi', 'security:passport-saml:issuer') || '' }}"
|
|
|
+ readonly>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
<h4>Attribute Mapping</h4>
|
|
|
|
|
|
- <div class="form-group">
|
|
|
- <label for="settingForm[security:passport-saml:attrMapId]" class="col-xs-3 control-label">Identifier</label>
|
|
|
- <div class="col-xs-6">
|
|
|
- <input id="settingForm[security:passport-saml:attrMapId]" class="form-control"
|
|
|
- type="text"
|
|
|
- name="settingForm[security:passport-saml:attrMapId]"
|
|
|
- value="{{ settingForm['security:passport-saml:attrMapId'] || '' }}">
|
|
|
- <p class="help-block">
|
|
|
- <small>
|
|
|
- {{ t("security_setting.SAML.id_detail") }}
|
|
|
- </small>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <table class="table">
|
|
|
+ <thead>
|
|
|
+ <tr><th></th><th>Database</th><th>Environment variables</th></tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>Identifier</th>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ name="settingForm[security:passport-saml:attrMapId]"
|
|
|
+ value="{{ getConfigFromDB('security:passport-saml:attrMapId') || '' }}">
|
|
|
+ <p class="help-block">
|
|
|
+ <small>
|
|
|
+ {{ t("security_setting.SAML.id_detail") }}
|
|
|
+ </small>
|
|
|
+ </p>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ value="{{ getConfigFromEnvVars('security:passport-saml:attrMapId') || '' }}"
|
|
|
+ readonly>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>Username</th>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ name="settingForm[security:passport-saml:attrMapUsername]"
|
|
|
+ value="{{ getConfigFromDB('security:passport-saml:attrMapUsername') || '' }}">
|
|
|
+ <p class="help-block">
|
|
|
+ <small>
|
|
|
+ {{ t("security_setting.SAML.username_detail") }}
|
|
|
+ </small>
|
|
|
+ </p>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ value="{{ getConfigFromEnvVars('security:passport-saml:attrMapUsername') || '' }}"
|
|
|
+ readonly>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>Mail</th>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ name="settingForm[security:passport-saml:attrMapMail]"
|
|
|
+ value="{{ getConfigFromDB('security:passport-saml:attrMapMail') || '' }}">
|
|
|
+ <p class="help-block">
|
|
|
+ <small>
|
|
|
+ {{ t("security_setting.SAML.mapping_detail", t("Email")) }}
|
|
|
+ </small>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ value="{{ getConfigFromEnvVars('security:passport-saml:attrMapMail') || '' }}"
|
|
|
+ readonly>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>{{ t("security_setting.SAML.First Name") }}</th>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ placeholder="Default: firstName"
|
|
|
+ name="settingForm[security:passport-saml:attrMapFirstName]"
|
|
|
+ value="{{ getConfigFromDB('security:passport-saml:attrMapFirstName') || '' }}">
|
|
|
+ <p class="help-block">
|
|
|
+ <small>
|
|
|
+ {{ t("security_setting.SAML.mapping_detail", t("security_setting.SAML.First Name")) }}
|
|
|
+ </small>
|
|
|
+ </p>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ value="{{ getConfigFromEnvVars('security:passport-saml:attrMapFirstName') || '' }}"
|
|
|
+ readonly>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>{{ t("security_setting.SAML.Last Name") }}</th>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ placeholder="Default: lastName"
|
|
|
+ name="settingForm[security:passport-saml:attrMapLastName]"
|
|
|
+ value="{{ getConfigFromDB('security:passport-saml:attrMapLastName') || '' }}">
|
|
|
+ <p class="help-block">
|
|
|
+ <small>
|
|
|
+ {{ t("security_setting.SAML.mapping_detail", t("security_setting.SAML.Last Name")) }}
|
|
|
+ </small>
|
|
|
+ </p>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input class="form-control"
|
|
|
+ type="text"
|
|
|
+ value="{{ getConfigFromEnvVars('security:passport-saml:attrMapLastName') || '' }}"
|
|
|
+ readonly>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
- <div class="form-group">
|
|
|
- <label for="settingForm[security:passport-saml:attrMapUsername]" class="col-xs-3 control-label">Username</label>
|
|
|
- <div class="col-xs-6">
|
|
|
- <input id="settingForm[security:passport-saml:attrMapUsername]" class="form-control"
|
|
|
- type="text"
|
|
|
- name="settingForm[security:passport-saml:attrMapUsername]"
|
|
|
- value="{{ settingForm['security:passport-saml:attrMapUsername'] || '' }}">
|
|
|
- <p class="help-block">
|
|
|
- <small>
|
|
|
- {{ t("security_setting.SAML.username_detail") }}
|
|
|
- </small>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <h4>Attribute Mapping Options</h4>
|
|
|
|
|
|
<div class="form-group">
|
|
|
- <div class="col-xs-6 col-xs-offset-3">
|
|
|
+ <div class="col-xs-offset-1">
|
|
|
<div class="checkbox checkbox-info">
|
|
|
<input id="bindByUserName-SAML"
|
|
|
type="checkbox"
|
|
|
@@ -121,22 +223,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
- <label for="settingForm[security:passport-saml:attrMapMail]" class="col-xs-3 control-label">Mail</label>
|
|
|
- <div class="col-xs-6">
|
|
|
- <input id="settingForm[security:passport-saml:attrMapMail]" class="form-control"
|
|
|
- type="text"
|
|
|
- name="settingForm[security:passport-saml:attrMapMail]"
|
|
|
- value="{{ settingForm['security:passport-saml:attrMapMail'] || '' }}">
|
|
|
- <p class="help-block">
|
|
|
- <small>
|
|
|
- {{ t("security_setting.SAML.mapping_detail", t("Email")) }}
|
|
|
- </small>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="form-group">
|
|
|
- <div class="col-xs-6 col-xs-offset-3">
|
|
|
+ <div class="col-xs-offset-1">
|
|
|
<div class="checkbox checkbox-info">
|
|
|
<input id="bindByEmail-SAML"
|
|
|
type="checkbox"
|
|
|
@@ -155,67 +242,52 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="form-group">
|
|
|
- <label for="settingForm[security:passport-saml:attrMapFirstName]" class="col-xs-3 control-label">{{ t("security_setting.SAML.First Name") }}</label>
|
|
|
- <div class="col-xs-6">
|
|
|
- <input id="settingForm[security:passport-saml:attrMapFirstName]" class="form-control"
|
|
|
- type="text"
|
|
|
- placeholder="Default: firstName"
|
|
|
- name="settingForm[security:passport-saml:attrMapFirstName]"
|
|
|
- value="{{ settingForm['security:passport-saml:attrMapFirstName'] || '' }}">
|
|
|
- <p class="help-block">
|
|
|
- <small>
|
|
|
- {{ t("security_setting.SAML.mapping_detail", t("security_setting.SAML.First Name")) }}
|
|
|
- </small>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="form-group">
|
|
|
- <label for="settingForm[security:passport-saml:attrMapLastName]" class="col-xs-3 control-label">{{ t("security_setting.SAML.Last Name") }}</label>
|
|
|
- <div class="col-xs-6">
|
|
|
- <input id="settingForm[security:passport-saml:attrMapLastName]" class="form-control"
|
|
|
- type="text"
|
|
|
- placeholder="Default: lastName"
|
|
|
- name="settingForm[security:passport-saml:attrMapLastName]"
|
|
|
- value="{{ settingForm['security:passport-saml:attrMapLastName'] || '' }}">
|
|
|
- <p class="help-block">
|
|
|
- <small>
|
|
|
- {{ t("security_setting.SAML.mapping_detail", t("security_setting.SAML.Last Name")) }}
|
|
|
- </small>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
<h4>Options</h4>
|
|
|
|
|
|
- <div class="form-group">
|
|
|
- <label for="settingForm[security:passport-saml:cert]" class="col-xs-3 control-label">Certificate</label>
|
|
|
- <div class="col-xs-6">
|
|
|
- <textarea id="settingForm[security:passport-saml:cert]" class="form-control input-sm"
|
|
|
- type="text"
|
|
|
- rows="5"
|
|
|
- name="settingForm[security:passport-saml:cert]">{{ settingForm['security:passport-saml:cert'] || '' }}</textarea>
|
|
|
- <p class="help-block">
|
|
|
- <small>
|
|
|
- {{ t("security_setting.SAML.cert_detail1") }}<br>
|
|
|
- {{ t("security_setting.SAML.cert_detail2") }}
|
|
|
- </small>
|
|
|
- </p>
|
|
|
- <p>
|
|
|
- <small>
|
|
|
- e.g.
|
|
|
- <pre>-----BEGIN CERTIFICATE-----
|
|
|
+ <table class="table">
|
|
|
+ <thead>
|
|
|
+ <tr><th></th><th>Database</th><th>Environment variables</th></tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>Certificate</th>
|
|
|
+ <td>
|
|
|
+ <textarea class="form-control input-sm"
|
|
|
+ type="text"
|
|
|
+ rows="5"
|
|
|
+ name="settingForm[security:passport-saml:cert]">
|
|
|
+ {{ getConfigFromDB('security:passport-saml:cert') || '' }}
|
|
|
+ </textarea>
|
|
|
+ <p class="help-block">
|
|
|
+ <small>
|
|
|
+ {{ t("security_setting.SAML.cert_detail1") }}<br>
|
|
|
+ {{ t("security_setting.SAML.cert_detail2") }}
|
|
|
+ </small>
|
|
|
+ </p>
|
|
|
+ <p>
|
|
|
+ <small>
|
|
|
+ e.g.
|
|
|
+ <pre>-----BEGIN CERTIFICATE-----
|
|
|
MIICBzCCAXACCQD4US7+0A/b/zANBgkqhkiG9w0BAQsFADBIMQswCQYDVQQGEwJK
|
|
|
UDEOMAwGA1UECAwFVG9reW8xFTATBgNVBAoMDFdFU0VFSywgSW5jLjESMBAGA1UE
|
|
|
...
|
|
|
crmVwBzbloUO2l6k1ibwD2WVwpdxMKIF5z58HfKAvxZAzCHE7kMEZr1ge30WRXQA
|
|
|
pWVdnzS1VCO8fKsJ7YYIr+JmHvseph3kFUOI5RqkCcMZlKUv83aUThsTHw==
|
|
|
-----END CERTIFICATE-----</pre>
|
|
|
- </small>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </small>
|
|
|
+ </p>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <textarea class="form-control input-sm"
|
|
|
+ type="text"
|
|
|
+ rows="5"
|
|
|
+ readonly>
|
|
|
+ {{ getConfigFromEnvVars('security:passport-saml:cert') || '' }}
|
|
|
+ </textarea>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
</fieldset>
|
|
|
|