import{s as De,o as Fe,n as Ne}from"../chunks/scheduler.d6170356.js";import{S as Je,i as Ye,g as a,s,r as T,A as qe,h as o,f as i,c as l,j as Oe,u as z,x as u,k as g,y as Qe,a as n,v as M,d as k,t as H,w as P,m as Re,n as Ve}from"../chunks/index.fcd4cc08.js";import{T as Be}from"../chunks/Tip.b09c67cf.js";import{C as Ge}from"../chunks/CodeBlock.7b16bdef.js";import{H as ft,E as Ze}from"../chunks/EditOnGithub.da2b595c.js";function We(gt){let r,f,m="Enterprise Hub",c;return{c(){r=Re("This feature is part of the "),f=a("a"),f.textContent=m,c=Re("."),this.h()},l(p){r=Ve(p,"This feature is part of the "),f=o(p,"A",{href:!0,"data-svelte-h":!0}),u(f)!=="svelte-vg0acv"&&(f.textContent=m),c=Ve(p,"."),this.h()},h(){g(f,"href","https://huggingface.co/enterprise")},m(p,d){n(p,r,d),n(p,f,d),n(p,c,d)},p:Ne,d(p){p&&(i(r),i(f),i(c))}}}function Xe(gt){let r,f,m,c,p,d,A,ie="In this guide, we will use Azure as the SSO provider and with the Security Assertion Markup Language (SAML) protocol as our preferred identity protocol.",ct,I,ne="We currently support SP-initiated and IdP-initiated authentication. User provisioning is not yet supported at this time.",mt,h,dt,E,ht,j,se="Open a new tab/window in your browser and sign in to the Azure portal of your organization.",vt,U,le="Navigate to “Enterprise applications” and click the “New application” button.",xt,v,ae='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-1.png"/>',Ct,O,oe="You’ll be redirected to this page, click on “Create your own application”, fill the name of your application, and then “Create” the application.",$t,x,ue='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-2.png"/>',yt,R,pe="Then select “Single Sign-On”, and select SAML",St,C,re='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-3.png"/>',wt,V,bt,D,fe="Open a new tab/window in your browser and navigate to the SSO section of your organization’s settings. Select the SAML protocol.",Lt,$,ge='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-navigation-settings.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-navigation-settings-dark.png"/>',_t,y,ce='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-settings-saml.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-settings-saml-dark.png"/>',Tt,F,me="Copy the “SP Entity Id” from the organization’s settings on Hugging Face, and paste it in the “Identifier (Entity Id)” field on Azure (1).",zt,N,de="Copy the “Assertion Consumer Service URL” from the organization’s settings on Hugging Face, and paste it in the “Reply URL” field on Azure (2).",Mt,J,he="The URL looks like this: <code>https://huggingface.co/organizations/[organizationIdentifier]/saml/consume</code>.",kt,S,ve='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-4.png"/>',Ht,Y,xe="Then under “SAML Certificates”, verify that “Signin Option” is set to “Sign SAML response and assertion”.",Pt,w,Ce='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-5.png"/>',At,q,$e="Save your new application.",It,Q,Et,B,ye="In your Azure application, under “Set up”, find the following field:",jt,G,Se="<li>Login Url</li>",Ut,Z,we="And under “SAML Certificates”:",Ot,W,be="<li>Download the “Certificate (base64)”</li>",Rt,X,Le="You will need them to finalize the SSO setup on Hugging Face.",Vt,b,_e='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-6.png"/>',Dt,K,Te="In the SSO section of your organization’s settings, copy-paste these values from Azure:",Ft,tt,ze="<li>Login Url -&gt; Sign-on URL</li> <li>Certificate -&gt; Public certificate</li>",Nt,et,Me="The public certificate must have the following format:",Jt,it,Yt,L,ke='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-7.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-7-dark.png"/>',qt,nt,He="You can now click on “Update and Test SAML configuration” to save the settings.",Qt,st,Pe="You should be redirected to your SSO provider (IdP) login prompt. Once logged in, you’ll be redirected to your organization’s settings page.",Bt,lt,Ae="A green check mark near the SAML selector will attest that the test was successful.",Gt,_,Ie='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-8.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/sso/sso-azure-guide-8-dark.png"/>',Zt,at,Wt,ot,Ee="Now that Single Sign-On is configured and tested, you can enable it for members of your organization by clicking on the “Enable” button.",Xt,ut,je='Once enabled, members of your organization must complete the SSO authentication flow described in <a href="./security-sso#how-does-it-work">How does it work?</a>.',Kt,pt,te,rt,ee;return p=new ft({props:{title:"How to configure SAML SSO with Azure",local:"how-to-configure-saml-sso-with-azure",headingTag:"h1"}}),h=new Be({props:{warning:!0,$$slots:{default:[We]},$$scope:{ctx:gt}}}),E=new ft({props:{title:"Step 1: Create a new application in your Identity Provider",local:"step-1-create-a-new-application-in-your-identity-provider",headingTag:"h3"}}),V=new ft({props:{title:"Step 2: Configure your application on Azure",local:"step-2-configure-your-application-on-azure",headingTag:"h3"}}),Q=new ft({props:{title:"Step 3: Finalize configuration on Hugging Face",local:"step-3-finalize-configuration-on-hugging-face",headingTag:"h3"}}),it=new Ge({props:{code:"LS0tLS1CRUdJTiUyMENFUlRJRklDQVRFLS0tLS0lMEElN0JjZXJ0aWZpY2F0ZSU3RCUwQS0tLS0tRU5EJTIwQ0VSVElGSUNBVEUtLS0tLQ==",highlighted:`<span class="hljs-literal">-----</span><span class="hljs-comment">BEGIN CERTIFICATE</span><span class="hljs-literal">-----</span>
<span class="hljs-comment">{certificate}</span>
<span class="hljs-literal">-----</span><span class="hljs-comment">END CERTIFICATE</span><span class="hljs-literal">-----</span>`,wrap:!1}}),at=new ft({props:{title:"Step 4: Enable SSO in your organization",local:"step-4-enable-sso-in-your-organization",headingTag:"h3"}}),pt=new Ze({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/security-sso-azure-saml.md"}}),{c(){r=a("meta"),f=s(),m=a("p"),c=s(),T(p.$$.fragment),d=s(),A=a("p"),A.textContent=ie,ct=s(),I=a("p"),I.textContent=ne,mt=s(),T(h.$$.fragment),dt=s(),T(E.$$.fragment),ht=s(),j=a("p"),j.textContent=se,vt=s(),U=a("p"),U.textContent=le,xt=s(),v=a("div"),v.innerHTML=ae,Ct=s(),O=a("p"),O.textContent=oe,$t=s(),x=a("div"),x.innerHTML=ue,yt=s(),R=a("p"),R.textContent=pe,St=s(),C=a("div"),C.innerHTML=re,wt=s(),T(V.$$.fragment),bt=s(),D=a("p"),D.textContent=fe,Lt=s(),$=a("div"),$.innerHTML=ge,_t=s(),y=a("div"),y.innerHTML=ce,Tt=s(),F=a("p"),F.textContent=me,zt=s(),N=a("p"),N.textContent=de,Mt=s(),J=a("p"),J.innerHTML=he,kt=s(),S=a("div"),S.innerHTML=ve,Ht=s(),Y=a("p"),Y.textContent=xe,Pt=s(),w=a("div"),w.innerHTML=Ce,At=s(),q=a("p"),q.textContent=$e,It=s(),T(Q.$$.fragment),Et=s(),B=a("p"),B.textContent=ye,jt=s(),G=a("ul"),G.innerHTML=Se,Ut=s(),Z=a("p"),Z.textContent=we,Ot=s(),W=a("ul"),W.innerHTML=be,Rt=s(),X=a("p"),X.textContent=Le,Vt=s(),b=a("div"),b.innerHTML=_e,Dt=s(),K=a("p"),K.textContent=Te,Ft=s(),tt=a("ul"),tt.innerHTML=ze,Nt=s(),et=a("p"),et.textContent=Me,Jt=s(),T(it.$$.fragment),Yt=s(),L=a("div"),L.innerHTML=ke,qt=s(),nt=a("p"),nt.textContent=He,Qt=s(),st=a("p"),st.textContent=Pe,Bt=s(),lt=a("p"),lt.textContent=Ae,Gt=s(),_=a("div"),_.innerHTML=Ie,Zt=s(),T(at.$$.fragment),Wt=s(),ot=a("p"),ot.textContent=Ee,Xt=s(),ut=a("p"),ut.innerHTML=je,Kt=s(),T(pt.$$.fragment),te=s(),rt=a("p"),this.h()},l(t){const e=qe("svelte-u9bgzb",document.head);r=o(e,"META",{name:!0,content:!0}),e.forEach(i),f=l(t),m=o(t,"P",{}),Oe(m).forEach(i),c=l(t),z(p.$$.fragment,t),d=l(t),A=o(t,"P",{"data-svelte-h":!0}),u(A)!=="svelte-d4hi1l"&&(A.textContent=ie),ct=l(t),I=o(t,"P",{"data-svelte-h":!0}),u(I)!=="svelte-1uw109h"&&(I.textContent=ne),mt=l(t),z(h.$$.fragment,t),dt=l(t),z(E.$$.fragment,t),ht=l(t),j=o(t,"P",{"data-svelte-h":!0}),u(j)!=="svelte-14x2gqi"&&(j.textContent=se),vt=l(t),U=o(t,"P",{"data-svelte-h":!0}),u(U)!=="svelte-1in1pbm"&&(U.textContent=le),xt=l(t),v=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u(v)!=="svelte-kedgnv"&&(v.innerHTML=ae),Ct=l(t),O=o(t,"P",{"data-svelte-h":!0}),u(O)!=="svelte-auntd2"&&(O.textContent=oe),$t=l(t),x=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u(x)!=="svelte-n5twe8"&&(x.innerHTML=ue),yt=l(t),R=o(t,"P",{"data-svelte-h":!0}),u(R)!=="svelte-1dlxpe9"&&(R.textContent=pe),St=l(t),C=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u(C)!=="svelte-xoo4x1"&&(C.innerHTML=re),wt=l(t),z(V.$$.fragment,t),bt=l(t),D=o(t,"P",{"data-svelte-h":!0}),u(D)!=="svelte-1nr8jgz"&&(D.textContent=fe),Lt=l(t),$=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u($)!=="svelte-1os4n6r"&&($.innerHTML=ge),_t=l(t),y=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u(y)!=="svelte-6ydacv"&&(y.innerHTML=ce),Tt=l(t),F=o(t,"P",{"data-svelte-h":!0}),u(F)!=="svelte-1py3mim"&&(F.textContent=me),zt=l(t),N=o(t,"P",{"data-svelte-h":!0}),u(N)!=="svelte-1e7xie5"&&(N.textContent=de),Mt=l(t),J=o(t,"P",{"data-svelte-h":!0}),u(J)!=="svelte-mge5ik"&&(J.innerHTML=he),kt=l(t),S=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u(S)!=="svelte-y21i0a"&&(S.innerHTML=ve),Ht=l(t),Y=o(t,"P",{"data-svelte-h":!0}),u(Y)!=="svelte-15awdj7"&&(Y.textContent=xe),Pt=l(t),w=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u(w)!=="svelte-8yd81b"&&(w.innerHTML=Ce),At=l(t),q=o(t,"P",{"data-svelte-h":!0}),u(q)!=="svelte-pyiwmi"&&(q.textContent=$e),It=l(t),z(Q.$$.fragment,t),Et=l(t),B=o(t,"P",{"data-svelte-h":!0}),u(B)!=="svelte-1aasb2c"&&(B.textContent=ye),jt=l(t),G=o(t,"UL",{"data-svelte-h":!0}),u(G)!=="svelte-1qh43ld"&&(G.innerHTML=Se),Ut=l(t),Z=o(t,"P",{"data-svelte-h":!0}),u(Z)!=="svelte-4yrozn"&&(Z.textContent=we),Ot=l(t),W=o(t,"UL",{"data-svelte-h":!0}),u(W)!=="svelte-1up3axu"&&(W.innerHTML=be),Rt=l(t),X=o(t,"P",{"data-svelte-h":!0}),u(X)!=="svelte-115y6hi"&&(X.textContent=Le),Vt=l(t),b=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u(b)!=="svelte-p0k5ic"&&(b.innerHTML=_e),Dt=l(t),K=o(t,"P",{"data-svelte-h":!0}),u(K)!=="svelte-xglcq5"&&(K.textContent=Te),Ft=l(t),tt=o(t,"UL",{"data-svelte-h":!0}),u(tt)!=="svelte-3z3h0j"&&(tt.innerHTML=ze),Nt=l(t),et=o(t,"P",{"data-svelte-h":!0}),u(et)!=="svelte-k7dxmn"&&(et.textContent=Me),Jt=l(t),z(it.$$.fragment,t),Yt=l(t),L=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u(L)!=="svelte-m8xi5z"&&(L.innerHTML=ke),qt=l(t),nt=o(t,"P",{"data-svelte-h":!0}),u(nt)!=="svelte-b7hvyk"&&(nt.textContent=He),Qt=l(t),st=o(t,"P",{"data-svelte-h":!0}),u(st)!=="svelte-lto0we"&&(st.textContent=Pe),Bt=l(t),lt=o(t,"P",{"data-svelte-h":!0}),u(lt)!=="svelte-nyltxu"&&(lt.textContent=Ae),Gt=l(t),_=o(t,"DIV",{class:!0,"data-svelte-h":!0}),u(_)!=="svelte-1ktxul9"&&(_.innerHTML=Ie),Zt=l(t),z(at.$$.fragment,t),Wt=l(t),ot=o(t,"P",{"data-svelte-h":!0}),u(ot)!=="svelte-1gfp18n"&&(ot.textContent=Ee),Xt=l(t),ut=o(t,"P",{"data-svelte-h":!0}),u(ut)!=="svelte-2aa6u1"&&(ut.innerHTML=je),Kt=l(t),z(pt.$$.fragment,t),te=l(t),rt=o(t,"P",{}),Oe(rt).forEach(i),this.h()},h(){g(r,"name","hf:doc:metadata"),g(r,"content",Ke),g(v,"class","flex justify-center"),g(x,"class","flex justify-center"),g(C,"class","flex justify-center"),g($,"class","flex justify-center"),g(y,"class","flex justify-center"),g(S,"class","flex justify-center"),g(w,"class","flex justify-center"),g(b,"class","flex justify-center"),g(L,"class","flex justify-center"),g(_,"class","flex justify-center")},m(t,e){Qe(document.head,r),n(t,f,e),n(t,m,e),n(t,c,e),M(p,t,e),n(t,d,e),n(t,A,e),n(t,ct,e),n(t,I,e),n(t,mt,e),M(h,t,e),n(t,dt,e),M(E,t,e),n(t,ht,e),n(t,j,e),n(t,vt,e),n(t,U,e),n(t,xt,e),n(t,v,e),n(t,Ct,e),n(t,O,e),n(t,$t,e),n(t,x,e),n(t,yt,e),n(t,R,e),n(t,St,e),n(t,C,e),n(t,wt,e),M(V,t,e),n(t,bt,e),n(t,D,e),n(t,Lt,e),n(t,$,e),n(t,_t,e),n(t,y,e),n(t,Tt,e),n(t,F,e),n(t,zt,e),n(t,N,e),n(t,Mt,e),n(t,J,e),n(t,kt,e),n(t,S,e),n(t,Ht,e),n(t,Y,e),n(t,Pt,e),n(t,w,e),n(t,At,e),n(t,q,e),n(t,It,e),M(Q,t,e),n(t,Et,e),n(t,B,e),n(t,jt,e),n(t,G,e),n(t,Ut,e),n(t,Z,e),n(t,Ot,e),n(t,W,e),n(t,Rt,e),n(t,X,e),n(t,Vt,e),n(t,b,e),n(t,Dt,e),n(t,K,e),n(t,Ft,e),n(t,tt,e),n(t,Nt,e),n(t,et,e),n(t,Jt,e),M(it,t,e),n(t,Yt,e),n(t,L,e),n(t,qt,e),n(t,nt,e),n(t,Qt,e),n(t,st,e),n(t,Bt,e),n(t,lt,e),n(t,Gt,e),n(t,_,e),n(t,Zt,e),M(at,t,e),n(t,Wt,e),n(t,ot,e),n(t,Xt,e),n(t,ut,e),n(t,Kt,e),M(pt,t,e),n(t,te,e),n(t,rt,e),ee=!0},p(t,[e]){const Ue={};e&2&&(Ue.$$scope={dirty:e,ctx:t}),h.$set(Ue)},i(t){ee||(k(p.$$.fragment,t),k(h.$$.fragment,t),k(E.$$.fragment,t),k(V.$$.fragment,t),k(Q.$$.fragment,t),k(it.$$.fragment,t),k(at.$$.fragment,t),k(pt.$$.fragment,t),ee=!0)},o(t){H(p.$$.fragment,t),H(h.$$.fragment,t),H(E.$$.fragment,t),H(V.$$.fragment,t),H(Q.$$.fragment,t),H(it.$$.fragment,t),H(at.$$.fragment,t),H(pt.$$.fragment,t),ee=!1},d(t){t&&(i(f),i(m),i(c),i(d),i(A),i(ct),i(I),i(mt),i(dt),i(ht),i(j),i(vt),i(U),i(xt),i(v),i(Ct),i(O),i($t),i(x),i(yt),i(R),i(St),i(C),i(wt),i(bt),i(D),i(Lt),i($),i(_t),i(y),i(Tt),i(F),i(zt),i(N),i(Mt),i(J),i(kt),i(S),i(Ht),i(Y),i(Pt),i(w),i(At),i(q),i(It),i(Et),i(B),i(jt),i(G),i(Ut),i(Z),i(Ot),i(W),i(Rt),i(X),i(Vt),i(b),i(Dt),i(K),i(Ft),i(tt),i(Nt),i(et),i(Jt),i(Yt),i(L),i(qt),i(nt),i(Qt),i(st),i(Bt),i(lt),i(Gt),i(_),i(Zt),i(Wt),i(ot),i(Xt),i(ut),i(Kt),i(te),i(rt)),i(r),P(p,t),P(h,t),P(E,t),P(V,t),P(Q,t),P(it,t),P(at,t),P(pt,t)}}}const Ke='{"title":"How to configure SAML SSO with Azure","local":"how-to-configure-saml-sso-with-azure","sections":[{"title":"Step 1: Create a new application in your Identity Provider","local":"step-1-create-a-new-application-in-your-identity-provider","sections":[],"depth":3},{"title":"Step 2: Configure your application on Azure","local":"step-2-configure-your-application-on-azure","sections":[],"depth":3},{"title":"Step 3: Finalize configuration on Hugging Face","local":"step-3-finalize-configuration-on-hugging-face","sections":[],"depth":3},{"title":"Step 4: Enable SSO in your organization","local":"step-4-enable-sso-in-your-organization","sections":[],"depth":3}],"depth":1}';function ti(gt){return Fe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ai extends Je{constructor(r){super(),Ye(this,r,ti,Xe,De,{})}}export{ai as component};
