saml_fields.mustache 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <%
  2. # Copyright (C) 2015 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <p><%= mt(<<-TEXT, metadata_url: link_to(aac.entity_id, aac.entity_id))
  19. The Canvas SAML Entity ID is %{metadata_url}, and the Service Provider metadata
  20. is available at that URL.
  21. TEXT
  22. %></p>
  23. <% css_bundle :saml_fields %>
  24. <p><%= t(<<-TEXT)
  25. Provide a URI to your IdP's metadata to automatically populate the other
  26. fields. If your school is part of InCommon or the UK Access Management
  27. Federation, specify urn:mace:incommon or http://ukfederation.org.uk,
  28. respectively, for the metadata URI, and also provide your school's entity ID.
  29. TEXT
  30. %></p>
  31. <div class="ic-Form-control">
  32. <%= f.label :metadata_uri, t('IdP Metadata URI'), class: 'ic-Label', for: "metadata_uri_#{presenter.id_suffix(aac)}" %>
  33. <%= f.text_field :metadata_uri, class: 'ic-Input', id: "metadata_uri_#{presenter.id_suffix(aac)}" %>
  34. </div>
  35. <div class="ic-Form-control">
  36. <%= f.label :idp_entity_id, t('IdP Entity ID'), class: 'ic-Label', for: "idp_entity_id_#{presenter.id_suffix(aac)}" %>
  37. <%= f.text_field :idp_entity_id, class: 'ic-Input', id: "idp_entity_id_#{presenter.id_suffix(aac)}" %>
  38. </div>
  39. <div class="ic-Form-control">
  40. <%= f.label :log_in_url, t('Log On URL'), class: 'ic-Label', for: "log_in_url_#{presenter.id_suffix(aac)}" %>
  41. <%= f.text_field :log_in_url, class: 'ic-Input', id: "log_in_url_#{presenter.id_suffix(aac)}" %>
  42. </div>
  43. <div class="ic-Form-control">
  44. <%= f.label :log_out_url, t('Log Out URL'), class: 'ic-Label', for: "log_out_url_#{presenter.id_suffix(aac)}" %>
  45. <%= f.text_field :log_out_url, class: 'ic-Input', id: "log_out_url_#{presenter.id_suffix(aac)}" %>
  46. </div>
  47. <div class="ic-Form-control">
  48. <%= f.label :certificate_fingerprint, t('Certificate Fingerprint'), class: 'ic-Label', for: "certificate_fingerprint_#{presenter.id_suffix(aac)}" %>
  49. <%= f.text_field :certificate_fingerprint, class: 'ic-Input', id: "certificate_fingerprint_#{presenter.id_suffix(aac)}" %>
  50. </div>
  51. <%= render partial: 'login_attribute_dropdown', locals: { aac: aac, presenter: presenter, f: f } %>
  52. <div class="ic-Form-control">
  53. <%= f.label :identifier_format, 'Identifier Format', class: 'ic-Label', for: "identifier_format_#{presenter.id_suffix(aac)}" %>
  54. <%= f.select(:identifier_format,
  55. presenter.saml_identifiers,
  56. {},
  57. class: 'ic-Input', id: "identifier_format_#{presenter.id_suffix(aac)}") %>
  58. </div>
  59. <div class="ic-Form-control">
  60. <%= f.label :requested_authn_context, 'Authentication Context', class: 'ic-Label', for: "requested_authn_context_#{presenter.id_suffix(aac)}" %>
  61. <%= f.select(:requested_authn_context,
  62. presenter.saml_authn_contexts,
  63. {},
  64. class: 'ic-Input', id: "requested_authn_context_#{presenter.id_suffix(aac)}") %>
  65. </div>
  66. <% if @account.self_registration? %>
  67. <div id="parent_reg_selected" data-parent-reg-selected="<%= presenter.parent_reg_selected %>"></div>
  68. <div class="ic-Form-control">
  69. <%= f.label :parent_registration, "Parent Registration", class: 'ic-Label', for: "parent_registration_#{presenter.id_suffix(aac)}" %>
  70. <%= f.check_box :parent_registration, class: "parent_reg_warning", id: "parent_registration_#{presenter.id_suffix(aac)}" %>
  71. <span class="SAML_parent_default" ><%= t "Use this configuration for parent/observer registration" %></span>
  72. <div class="parent_form_message">
  73. <div class="parent_form_message_layout">
  74. <i class="parent_icon_warning"></i>
  75. <span class="parent_warning_message"></span>
  76. </div>
  77. </div>
  78. </div>
  79. <% end %>
  80. <%= render partial: 'jit_provisioning_field', locals: { aac: aac, presenter: presenter, f: f } %>