github.com/minio/console@v1.4.1/web-app/build/static/js/5699.016e97fa.chunk.js (about)

     1  "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[5699],{38392:(e,i,t)=>{t.d(i,{A:()=>l});var r=t(65043),n=t(89923),o=t(70579);const a=e=>{let{icon:i,description:t}=e;return(0,o.jsxs)(n.azJ,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[i," ",(0,o.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:t})]})},l=e=>{let{helpText:i,docLink:t,docText:l,contents:s}=e;return(0,o.jsxs)(n.azJ,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px"},children:[(0,o.jsxs)(n.azJ,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px",paddingBottom:"20px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,o.jsx)(n.nag,{}),(0,o.jsx)("div",{children:i})]}),(0,o.jsxs)(n.azJ,{sx:{fontSize:"14px",marginBottom:"15px"},children:[s.map(((e,i)=>(0,o.jsxs)(r.Fragment,{children:[e.icon&&(0,o.jsx)(n.azJ,{sx:{paddingBottom:"20px"},children:(0,o.jsx)(a,{icon:e.icon,description:e.iconDescription})}),(0,o.jsx)(n.azJ,{sx:{paddingBottom:"20px"},children:e.text})]},"feature-item-".concat(i)))),(0,o.jsx)(n.azJ,{sx:{paddingBottom:"20px"},children:(0,o.jsx)("a",{href:t,target:"_blank",rel:"noopener",children:l})})]})]})}},79313:(e,i,t)=>{t.d(i,{A:()=>p});var r=t(65043),n=t(89923),o=t(64159),a=t(20554),l=t(58661),s=t(56629),d=t(53518),c=t(70579);const p=e=>{let{closeDeleteModalAndRefresh:i,deleteOpen:t,idp:p,idpType:u}=e;const h=(0,a.jL)(),[x,m]=(0,r.useState)(!1);if(!p)return null;const f="_"===p?"Default":p;return(0,c.jsx)(l.A,{title:"Delete ".concat(f),confirmText:"Delete",isOpen:t,titleIcon:(0,c.jsx)(n.xWY,{}),isLoading:x,onConfirm:()=>{m(!0),s.F.idp.deleteConfiguration(p,u).then((e=>{(e=>{i(!0),h((0,o.YR)(!0===e.restart))})(e.data)})).catch((e=>h((0,o.C9)((0,d.S)(e.error))))).finally((()=>m(!1)))},onClose:()=>i(!1),confirmButtonProps:{disabled:x},confirmationContent:(0,c.jsxs)(r.Fragment,{children:["Are you sure you want to delete IDP ",(0,c.jsx)("b",{children:f})," ","configuration? ",(0,c.jsx)("br",{})]})})}},65699:(e,i,t)=>{t.r(i),t.d(i,{default:()=>b});var r=t(65043),n=t(99161),o=t(89923),a=t(42349),l=t(73216),s=t(77403),d=t(20554),c=t(64159),p=t(79313),u=t(48793),h=t(55968),x=t(56629),m=t(53518),f=t(70579);const g=e=>{let{formFields:i,endpoint:t,backLink:n,header:a,idpType:g,icon:y,helpBox:b}=e;const D=(0,d.jL)(),j=(0,l.Zp)(),C=(0,l.g)().idpName,[v,O]=(0,r.useState)(!0),[I,_]=(0,r.useState)(!1),[S,k]=(0,r.useState)(!1),[E,w]=(0,r.useState)(!1),[A,q]=(0,r.useState)({}),[L,B]=(0,r.useState)({}),[N,P]=(0,r.useState)({}),[M,R]=(0,r.useState)({}),[T,F]=(0,r.useState)(!1),[U,z]=(0,r.useState)(!1),[J,G]=(0,r.useState)(!1),$=(0,r.useCallback)((e=>{let i={},t={},r=0;e.info&&(e.info.forEach((e=>{"enable"===e.key&&w("on"===e.value),e.isEnv&&(t[e.key]="MINIO_IDENTITY_OPENID_".concat(e.key.toUpperCase()).concat("_"!==C?"_".concat(C):""),r++),i[e.key]=e.value})),r>0&&G(!0)),q(i),B(t)}),[C]),Y=()=>{T&&$(M),F(!T)};(0,r.useEffect)((()=>{const e=()=>{x.F.idp.getConfiguration(C||"","openid").then((e=>{e.data&&(R(e.data),$(e.data),(e=>{let i={};e.info&&e.info.forEach((e=>{i[e.key]=e.value})),P(i)})(e.data))})).catch((e=>{D((0,c.C9)((0,m.S)(e.error)))})).finally((()=>O(!1)))};v&&e()}),[D,v,C,t,$]);const V=()=>{for(const[e,t]of Object.entries(i))if(t.required&&(void 0===A[e]||null===A[e]||""===A[e]))return!1;return!0},K=()=>{q({})};return(0,r.useEffect)((()=>{D((0,c.ph)("idp_config"))}),[D]),(0,f.jsxs)(r.Fragment,{children:[U&&C&&(0,f.jsx)(p.A,{deleteOpen:U,idp:C,idpType:g,closeDeleteModalAndRefresh:async e=>{z(!1),e&&j(n)}}),(0,f.jsxs)(o.xA9,{item:!0,xs:12,children:[(0,f.jsx)(u.A,{label:(0,f.jsx)(o.EGL,{onClick:()=>j(n),label:a}),actions:(0,f.jsx)(h.A,{})}),(0,f.jsxs)(o.Mxu,{children:[(0,f.jsx)(o.lcx,{icon:y,title:"_"===C?"Default":C||"",subTitle:null,actions:(0,f.jsxs)(r.Fragment,{children:["_"!==C&&(0,f.jsx)(o.m_M,{tooltip:J?"This configuration cannot be deleted using this module as this was set using OpenID environment variables.":"",children:(0,f.jsx)(o.$nd,{id:"delete-idp-config",onClick:()=>{z(!0)},label:"Delete Configuration",icon:(0,f.jsx)(o.ucK,{}),variant:"secondary",disabled:J})}),!T&&(0,f.jsx)(o.m_M,{tooltip:J?"Configuration cannot be edited in this module as OpenID environment variables are set for this MinIO instance.":"",children:(0,f.jsx)(o.$nd,{id:"edit",type:"button",variant:"callAction",icon:(0,f.jsx)(o.qUP,{}),onClick:Y,label:"Edit",disabled:J})}),(0,f.jsx)(o.m_M,{tooltip:J?"Configuration cannot be disabled / enabled in this module as OpenID environment variables are set for this MinIO instance.":"",children:(0,f.jsx)(o.$nd,{id:"is-configuration-enabled",onClick:()=>(e=>{k(!0);const i="enable=".concat(e?"on":"off");x.F.idp.updateConfiguration(C||"","openid",{input:i}).then((e=>{e.data&&(w(!E),D((0,c.YR)(!0===e.data.restart)))})).catch((e=>{D((0,c.C9)((0,m.S)(e.error)))})).finally((()=>k(!1)))})(!E),label:E?"Disable":"Enable",disabled:S||J})}),(0,f.jsx)(o.$nd,{id:"refresh-idp-config",onClick:()=>O(!0),label:"Refresh",icon:(0,f.jsx)(o.fNY,{})})]}),sx:{marginBottom:15}}),T?(0,f.jsx)(o.Hbc,{helpBox:b,children:(0,f.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{_(!0),e.preventDefault();let t="";for(const r of Object.keys(i))(A[r]||A[r]!==N[r])&&(t+="".concat(r,"=").concat(A[r]," "));x.F.idp.updateConfiguration(C||"","openid",{input:t}).then((e=>{e.data&&(D((0,c.YR)(!0===e.data.restart)),F(!1))})).catch((async e=>{D((0,c.C9)((0,m.S)(e.error)))})).finally((()=>_(!1)))})(e)},children:(0,f.jsxs)(o.xA9,{container:!0,children:[T?(0,f.jsx)(o.xA9,{item:!0,xs:12,sx:{marginBottom:15},children:(0,f.jsx)(o.lVp,{title:(0,f.jsx)(o.azJ,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexGrow:1},children:"Client Secret must be re-entered to change OpenID configurations"}),iconComponent:(0,f.jsx)(o.cJw,{}),help:null})}):null,(0,f.jsxs)(o.xA9,{xs:12,item:!0,children:[Object.entries(i).map((e=>{let[i,t]=e;return((e,i)=>"toggle"===i.type?(0,f.jsx)(o.dOG,{indicatorLabels:["Enabled","Disabled"],checked:"on"===A[e],value:"is-field-enabled",id:"is-field-enabled",name:"is-field-enabled",label:i.label,tooltip:i.tooltip,onChange:i=>q({...A,[e]:i.target.checked?"on":"off"}),description:"",disabled:!T}):(0,f.jsx)(o.cl_,{id:e,required:i.required,name:e,label:i.label,tooltip:i.tooltip,error:i.hasError(A[e],T),value:A[e]?A[e]:"",onChange:i=>q({...A,[e]:i.target.value}),placeholder:i.placeholder,disabled:!T,type:i.type}))(i,t)})),(0,f.jsxs)(o.xA9,{item:!0,xs:12,sx:s.Uz.modalButtonBar,children:[T&&(0,f.jsx)(o.$nd,{id:"clear",type:"button",variant:"regular",onClick:K,label:"Clear"}),T&&(0,f.jsx)(o.$nd,{id:"cancel",type:"button",variant:"regular",onClick:Y,label:"Cancel"}),T&&(0,f.jsx)(o.$nd,{id:"save-key",type:"submit",variant:"callAction",color:"primary",disabled:v||I||!V(),label:"Save"})]})]})]})})}):(0,f.jsx)(o.azJ,{withBorders:!0,sx:{display:"grid",gridTemplateColumns:"1fr",gridAutoFlow:"dense",gap:3,padding:"15px",["@media (min-width: ".concat(o.nmC.sm,"px)")]:{gridTemplateColumns:"2fr 1fr",gridAutoFlow:"row"}},children:Object.entries(i).map((e=>{let[i,t]=e;if(!t.editOnly){let e=t.label,r=A[i]?A[i]:"";return"toggle"===t.type&&A[i]&&(r="on"!==r?"Off":"On"),L[i]&&(e=(0,f.jsxs)(o.azJ,{sx:{display:"flex",alignItems:"center",gap:5,"& .min-icon":{height:20,width:20},"& span":{height:20,display:"flex",alignItems:"center"}},children:[(0,f.jsx)("span",{children:t.label}),(0,f.jsx)(o.m_M,{tooltip:"This value is set from the ".concat(L[i]," environment variable"),placement:"right",children:(0,f.jsx)("span",{className:"muted",children:(0,f.jsx)(o.D0K,{})})})]}),r=(0,f.jsx)("i",{children:(0,f.jsx)("span",{className:"muted",children:r})})),(0,f.jsx)(o.mZW,{label:e,value:r},i)}return null}))})]})]})]})};var y=t(38392);const b=()=>(0,f.jsx)(g,{backLink:n.zZ.IDP_OPENID_CONFIGURATIONS,header:"OpenID Configurations",endpoint:"/api/v1/idp/openid/",idpType:"openid",helpBox:(0,f.jsx)(y.A,{helpText:"Learn more about OpenID Connect Configurations",contents:a.G5,docLink:"https://min.io/docs/minio/linux/operations/external-iam.html?ref=con#minio-external-iam-oidc",docText:"Learn more about OpenID Connect Configurations"}),formFields:a.Vb,icon:(0,f.jsx)(o.XAi,{width:40})})},42349:(e,i,t)=>{t.d(i,{G5:()=>a,Lq:()=>s,Vb:()=>l,iT:()=>o});var r=t(89923),n=t(70579);const o=[{text:"MinIO supports using an Active Directory or LDAP (AD/LDAP) service for external management of user identities. Configuring an external IDentity Provider (IDP) enables Single-Sign On (SSO) workflows, where applications authenticate against the external IDP before accessing MinIO.",icon:(0,n.jsx)(r.Tir,{}),iconDescription:"Create Configurations"},{text:"MinIO queries the configured Active Directory / LDAP server to verify the credentials specified by the application and optionally return a list of groups in which the user has membership. MinIO supports two modes (Lookup-Bind Mode and Username-Bind Mode) for performing these queries",icon:null,iconDescription:""},{text:"MinIO recommends using Lookup-Bind mode as the preferred method for verifying AD/LDAP credentials. Username-Bind mode is a legacy method retained for backwards compatibility only.",icon:null,iconDescription:""}],a=[{text:"MinIO supports using an OpenID Connect (OIDC) compatible IDentity Provider (IDP) such as Okta, KeyCloak, Dex, Google, or Facebook for external management of user identities.",icon:(0,n.jsx)(r.XAi,{}),iconDescription:"Create Configurations"},{text:"Configuring an external IDP enables Single-Sign On workflows, where applications authenticate against the external IDP before accessing MinIO.",icon:null,iconDescription:""}],l={config_url:{required:!0,hasError:(e,i)=>!e&&i?"Config URL is required":"",label:"Config URL",tooltip:"Config URL for identity provider configuration",placeholder:"https://identity-provider-url/.well-known/openid-configuration",type:"text",editOnly:!1},client_id:{required:!0,hasError:(e,i)=>!e&&i?"Client ID is required":"",label:"Client ID",tooltip:"Identity provider Client ID",placeholder:"Enter Client ID",type:"text",editOnly:!1},client_secret:{required:!0,hasError:(e,i)=>!e&&i?"Client Secret is required":"",label:"Client Secret",tooltip:"Identity provider Client Secret",placeholder:"Enter Client Secret",type:"password",editOnly:!0},claim_name:{required:!1,label:"Claim Name",tooltip:"Claim from which MinIO will read the policy or role to use",placeholder:"Enter Claim Name",type:"text",hasError:(e,i)=>"",editOnly:!1},display_name:{required:!1,label:"Display Name",tooltip:"",placeholder:"Enter Display Name",type:"text",hasError:(e,i)=>"",editOnly:!1},claim_prefix:{required:!1,label:"Claim Prefix",tooltip:"",placeholder:"Enter Claim Prefix",type:"text",hasError:(e,i)=>"",editOnly:!1},scopes:{required:!1,label:"Scopes",tooltip:"",placeholder:"openid,profile,email",type:"text",hasError:(e,i)=>"",editOnly:!1},redirect_uri:{required:!1,label:"Redirect URI",tooltip:"",placeholder:"https://console-endpoint-url/oauth_callback",type:"text",hasError:(e,i)=>"",editOnly:!1},role_policy:{required:!1,label:"Role Policy",tooltip:"",placeholder:"readonly",type:"text",hasError:(e,i)=>"",editOnly:!1},claim_userinfo:{required:!1,label:"Claim User Info",tooltip:"",placeholder:"Claim User Info",type:"toggle",hasError:(e,i)=>"",editOnly:!1},redirect_uri_dynamic:{required:!1,label:"Redirect URI Dynamic",tooltip:"",placeholder:"Redirect URI Dynamic",type:"toggle",hasError:(e,i)=>"",editOnly:!1}},s={server_insecure:{required:!0,hasError:(e,i)=>!e&&i?"Server Address is required":"",label:"Server Insecure",tooltip:"Disable SSL certificate verification ",placeholder:"myldapserver.com:636",type:"toggle",editOnly:!1},server_addr:{required:!0,hasError:(e,i)=>!e&&i?"Server Address is required":"",label:"Server Address",tooltip:'AD/LDAP server address e.g. "myldapserver.com:636"',placeholder:"myldapserver.com:636",type:"text",editOnly:!1},lookup_bind_dn:{required:!0,hasError:(e,i)=>!e&&i?"Lookup Bind DN is required":"",label:"Lookup Bind DN",tooltip:"DN (Distinguished Name) for LDAP read-only service account used to perform DN and group lookups",placeholder:"cn=admin,dc=min,dc=io",type:"text",editOnly:!1},lookup_bind_password:{required:!0,hasError:(e,i)=>!e&&i?"Lookup Bind Password is required":"",label:"Lookup Bind Password",tooltip:"Password for LDAP read-only service account used to perform DN and group lookups",placeholder:"admin",type:"password",editOnly:!0},user_dn_search_base_dn:{required:!0,hasError:(e,i)=>!e&&i?"User DN Search Base DN is required":"",label:"User DN Search Base",tooltip:"",placeholder:"DC=example,DC=net",type:"text",editOnly:!1},user_dn_search_filter:{required:!0,hasError:(e,i)=>!e&&i?"User DN Search Filter is required":"",label:"User DN Search Filter",tooltip:"",placeholder:"(sAMAcountName=%s)",type:"text",editOnly:!1},group_search_base_dn:{required:!1,hasError:(e,i)=>"",label:"Group Search Base DN",tooltip:"",placeholder:"ou=swengg,dc=min,dc=io",type:"text",editOnly:!1},group_search_filter:{required:!1,hasError:(e,i)=>"",label:"Group Search Filter",tooltip:"",placeholder:"(&(objectclass=groupofnames)(member=%d))",type:"text",editOnly:!1}}}}]);
     2  //# sourceMappingURL=5699.016e97fa.chunk.js.map