aboutsummaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2024-02-24 05:18:49 +0100
committerGitHub <noreply@github.com>2024-02-24 12:18:49 +0800
commit4ba642d07d50d7eb42ae33cd6f1f7f2c82c02a40 (patch)
tree52f879a6788100115c2127d62c0c6182cd96ad41 /templates/admin
parent875f5ea6d83c8371f309df99654ca3556623004c (diff)
downloadgitea-4ba642d07d50d7eb42ae33cd6f1f7f2c82c02a40.tar.gz
gitea-4ba642d07d50d7eb42ae33cd6f1f7f2c82c02a40.zip
Revert "Support SAML authentication (#25165)" (#29358)
This reverts #25165 (5bb8d1924d77c675467694de26697b876d709a17), as there was a chance some important reviews got missed. so after reverting this patch it will be resubmitted for reviewing again https://github.com/go-gitea/gitea/pull/25165#issuecomment-1960670242 temporary Open #5512 again
Diffstat (limited to 'templates/admin')
-rw-r--r--templates/admin/auth/edit.tmpl66
-rw-r--r--templates/admin/auth/new.tmpl6
-rw-r--r--templates/admin/auth/source/saml.tmpl62
3 files changed, 0 insertions, 134 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl
index 2182d011e9..25abefae00 100644
--- a/templates/admin/auth/edit.tmpl
+++ b/templates/admin/auth/edit.tmpl
@@ -367,69 +367,6 @@
</div>
{{end}}
- <!-- SAML -->
- {{if .Source.IsSAML}}
- {{$cfg:=.Source.Cfg}}
- <div class="inline required field">
- <label>{{ctx.Locale.Tr "admin.auths.saml_nameidformat"}}</label>
- <div class="ui selection type dropdown">
- <input type="hidden" id="name_id_format" name="name_id_format" value="{{$cfg.NameIDFormat}}">
- <div class="text">{{.CurrentNameIDFormat}}</div>
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- <div class="menu">
- {{range .NameIDFormats}}
- <div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
- {{end}}
- </div>
- </div>
- </div>
-
- <div class="optional field">
- <label for="saml_icon_url">{{ctx.Locale.Tr "admin.auths.saml_icon_url"}}</label>
- <input id="saml_icon_url" name="saml_icon_url" value="{{$cfg.IconURL}}">
- </div>
-
- <div class="field">
- <label for="identity_provider_metadata_url">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_metadata_url"}}</label>
- <input id="identity_provider_metadata_url" name="identity_provider_metadata_url" value="{{$cfg.IdentityProviderMetadataURL}}">
- </div>
- <div class="field">
- <label for="identity_provider_metadata">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_metadata"}}</label>
- <textarea rows=2 id="identity_provider_metadata" name="identity_provider_metadata">{{$cfg.IdentityProviderMetadata}}</textarea>
- </div>
-
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{ctx.Locale.Tr "admin.auths.saml_insecure_skip_assertion_signature_validation"}}</strong></label>
- <input name="insecure_skip_assertion_signature_validation" type="checkbox" {{if $cfg.InsecureSkipAssertionSignatureValidation}}checked{{end}}>
- </div>
- </div>
-
- <div class=" field">
- <label for="service_provider_certificate">{{ctx.Locale.Tr "admin.auths.saml_service_provider_certificate"}}</label>
- <textarea rows=2 id="service_provider_certificate" name="service_provider_certificate">{{$cfg.ServiceProviderCertificate}}</textarea>
- </div>
- <div class=" field">
- <label for="service_provider_private_key">{{ctx.Locale.Tr "admin.auths.saml_service_provider_private_key"}}</label>
- <textarea rows=2 id="service_provider_private_key" name="service_provider_private_key">{{$cfg.ServiceProviderPrivateKey}}</textarea>
- </div>
-
- <div class="field">
- <label for="email_assertion_key">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_email_assertion_key"}}</label>
- <input id="email_assertion_key" name="email_assertion_key" value="{{if not $cfg.EmailAssertionKey}}http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress{{else}}{{$cfg.EmailAssertionKey}}{{end}}">
- </div>
-
- <div class="field">
- <label for="name_assertion_key">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_name_assertion_key"}}</label>
- <input id="name_assertion_key" name="name_assertion_key" value="{{if not $cfg.NameAssertionKey}}http://schemas.xmlsoap.org/claims/CommonName{{else}}{{$cfg.NameAssertionKey}}{{end}}">
- </div>
-
- <div class="field">
- <label for="username_assertion_key">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_username_assertion_key"}}</label>
- <input id="username_assertion_key" name="username_assertion_key" value="{{if not $cfg.UsernameAssertionKey}}http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name{{else}}{{$cfg.UsernameAssertionKey}}{{end}}">
- </div>
- {{end}}
-
<!-- SSPI -->
{{if .Source.IsSSPI}}
{{$cfg:=.Source.Cfg}}
@@ -504,9 +441,6 @@
<h5>GMail Settings:</h5>
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
- <h5>SAML Settings:</h5>
- <p>{{ctx.Locale.Tr "admin.auths.tips.saml"}}</p>
-
<h5 class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:</h5>
<p class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p>
</div>
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl
index 665b0e3086..f32f77d5dc 100644
--- a/templates/admin/auth/new.tmpl
+++ b/templates/admin/auth/new.tmpl
@@ -53,9 +53,6 @@
<!-- SSPI -->
{{template "admin/auth/source/sspi" .}}
- <!-- SAML -->
- {{template "admin/auth/source/saml" .}}
-
<div class="ldap field">
<div class="ui checkbox">
<label><strong>{{ctx.Locale.Tr "admin.auths.attributes_in_bind"}}</strong></label>
@@ -88,9 +85,6 @@
<h5>GMail Settings:</h5>
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
- <h5>SAML Settings:</h5>
- <p>{{ctx.Locale.Tr "admin.auths.tips.saml"}}</p>
-
<h5 class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:</h5>
<p class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p>
diff --git a/templates/admin/auth/source/saml.tmpl b/templates/admin/auth/source/saml.tmpl
deleted file mode 100644
index 050e22ddcc..0000000000
--- a/templates/admin/auth/source/saml.tmpl
+++ /dev/null
@@ -1,62 +0,0 @@
-<div class="saml field {{if not (eq .type 8)}}gt-hidden{{end}}">
-
- <div class="inline required field">
- <label>{{ctx.Locale.Tr "admin.auths.saml_nameidformat"}}</label>
- <div class="ui selection type dropdown">
- <input type="hidden" id="name_id_format" name="name_id_format" value="{{.name_id_format}}">
- <div class="text">{{.CurrentNameIDFormat}}</div>
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- <div class="menu">
- {{range .NameIDFormats}}
- <div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
- {{end}}
- </div>
- </div>
- </div>
-
- <div class="optional field">
- <label for="saml_icon_url">{{ctx.Locale.Tr "admin.auths.saml_icon_url"}}</label>
- <input id="saml_icon_url" name="saml_icon_url" value="{{.SAMLIconURL}}">
- </div>
-
- <div class="field">
- <label for="identity_provider_metadata_url">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_metadata_url"}}</label>
- <input id="identity_provider_metadata_url" name="identity_provider_metadata_url" value="{{.IdentityProviderMetadataURL}}">
- </div>
- <div class="field">
- <label for="identity_provider_metadata">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_metadata"}}</label>
- <textarea rows=2 id="identity_provider_metadata" name="identity_provider_metadata" value="{{.IdentityProviderMetadata}}"></textarea>
- </div>
-
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{ctx.Locale.Tr "admin.auths.saml_insecure_skip_assertion_signature_validation"}}</strong></label>
- <input name="insecure_skip_assertion_signature_validation" type="checkbox" {{if .InsecureSkipAssertionSignatureValidation}}checked{{end}}>
- </div>
- </div>
-
- <div class="field">
- <label for="service_provider_certificate">{{ctx.Locale.Tr "admin.auths.saml_service_provider_certificate"}}</label>
- <textarea rows=2 id="service_provider_certificate" name="service_provider_certificate" value="{{.ServiceProviderCertificate}}"></textarea>
- </div>
- <div class="field">
- <label for="service_provider_private_key">{{ctx.Locale.Tr "admin.auths.saml_service_provider_private_key"}}</label>
- <textarea rows=2 id="service_provider_private_key" name="service_provider_private_key" value="{{.ServiceProviderPrivateKey}}"></textarea>
- </div>
-
- <div class="field">
- <label for="email_assertion_key">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_email_assertion_key"}}</label>
- <input id="email_assertion_key" name="email_assertion_key" value="{{if not .EmailAssertionKey}}http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress{{else}}{{.EmailAssertionKey}}{{end}}">
- </div>
-
- <div class="field">
- <label for="name_assertion_key">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_name_assertion_key"}}</label>
- <input id="name_assertion_key" name="name_assertion_key" value="{{if not .NameAssertionKey}}http://schemas.xmlsoap.org/claims/CommonName{{else}}{{.NameAssertionKey}}{{end}}">
- </div>
-
- <div class="field">
- <label for="username_assertion_key">{{ctx.Locale.Tr "admin.auths.saml_identity_provider_username_assertion_key"}}</label>
- <input id="username_assertion_key" name="username_assertion_key" value="{{if not .UsernameAssertionKey}}http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name{{else}}{{.UsernameAssertionKey}}{{end}}">
- </div>
-
-</div>