2 lines
17 KiB
JavaScript
2 lines
17 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1199],{65935:function(e,t,n){n.r(t),n.d(t,{default:function(){return T}});var i=n(29439),s=n(1413),o=n(72791),r=n(16871),c=n(11135),a=n(25787),l=n(23814),d=n(61889),u=n(64554),p=n(36151),x=n(15900),h=n(92217),m=n(32291),f=n(74794),y=n(21435),j=n(37516),g=n(80184),v=function(e){var t=e.icon,n=e.description;return(0,g.jsxs)(u.Z,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[t," ",(0,g.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:n})]})},Z=function(){return(0,g.jsxs)(u.Z,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px",marginTop:{xs:"0px"}},children:[(0,g.jsxs)(u.Z,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px",paddingBottom:"20px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,g.jsx)(x.M9A,{}),(0,g.jsx)("div",{children:"Learn more about Service Accounts"})]}),(0,g.jsxs)(u.Z,{sx:{fontSize:"14px",marginBottom:"15px"},children:[(0,g.jsxs)(u.Z,{sx:{paddingBottom:"20px"},children:[(0,g.jsx)(v,{icon:(0,g.jsx)(x.nO6,{}),description:"Create Service Accounts"}),(0,g.jsx)(u.Z,{sx:{paddingTop:"20px"},children:"Service Accounts inherit the policies explicitly attached to the parent user, and the policies attached to each group in which the parent user has membership."})]}),(0,g.jsxs)(u.Z,{sx:{paddingBottom:"20px"},children:[(0,g.jsx)(v,{icon:(0,g.jsx)(x.tvm,{}),description:"Assign Custom Credentials"}),(0,g.jsx)(u.Z,{sx:{paddingTop:"10px"},children:"Randomized access credentials are recommended, and provided by default. You may use your own custom Access Key and Secret Key by replacing the default values. After creation of any Service Account, you will be given the opportunity to view and download the account credentials."}),(0,g.jsx)(u.Z,{sx:{paddingTop:"10px"},children:"Service Accounts support programmatic access by applications. You cannot use a Service Account to log into the MinIO Console."})]}),(0,g.jsxs)(u.Z,{sx:{paddingBottom:"20px"},children:[(0,g.jsx)(v,{icon:(0,g.jsx)(x.v42,{}),description:"Assign Access Policies"}),(0,g.jsx)(u.Z,{sx:{paddingTop:"10px"},children:"You can specify an optional JSON-formatted IAM policy to further restrict Service Account access to a subset of the actions and resources explicitly allowed for the parent user. Additional access beyond that of the parent user cannot be implemented through these policies."}),(0,g.jsx)(u.Z,{sx:{paddingTop:"10px"},children:"You cannot modify the optional Service Account IAM policy after saving."})]})]}),(0,g.jsx)(u.Z,{sx:{display:"flex",flexFlow:"column"}})]})},b=n(84669),S=n(3579),C=n(20165),w=n(56087),A=n(81207),K=n(37798),N=n(50896),P=n(84741),M=n(60680),k=n(87995),O=n(81551),T=(0,a.Z)((function(e){return(0,c.Z)((0,s.Z)((0,s.Z)({bottomContainer:{display:"flex",flexGrow:1,alignItems:"center",margin:"auto",justifyContent:"center","& div":{width:150,"@media (max-width: 900px)":{flexFlow:"column"}}}},l.DF),l.ID))}))((function(e){var t=e.classes,n=(0,O.TL)(),s=(0,r.s0)(),c=(0,o.useState)(!1),a=(0,i.Z)(c,2),l=a[0],v=a[1],T=(0,o.useState)((0,P.z)(16)),B=(0,i.Z)(T,2),I=B[0],z=B[1],E=(0,o.useState)((0,P.z)(32)),F=(0,i.Z)(E,2),D=F[0],R=F[1],L=(0,o.useState)(!1),Y=(0,i.Z)(L,2),_=Y[0],J=Y[1],W=(0,o.useState)(null),H=(0,i.Z)(W,2),V=H[0],U=H[1],G=(0,o.useState)(!1),Q=(0,i.Z)(G,2),q=Q[0],X=Q[1],$=(0,o.useState)(""),ee=(0,i.Z)($,2),te=ee[0],ne=ee[1];(0,o.useEffect)((function(){l&&A.Z.invoke("POST","/api/v1/service-account-credentials",{policy:te,accessKey:I,secretKey:D}).then((function(e){v(!1),U({accessKey:e.accessKey||"",secretKey:e.secretKey||"",url:e.url||""})})).catch((function(e){v(!1),n((0,k.Ih)(e))}))}),[l,v,n,te,I,D]),(0,o.useEffect)((function(){_&&A.Z.invoke("GET","/api/v1/user/policy").then((function(e){ne(JSON.stringify(JSON.parse(e),null,4))}))}),[_]);return(0,g.jsxs)(o.Fragment,{children:[null!==V&&(0,g.jsx)(K.default,{newServiceAccount:V,open:null!==V,closeModal:function(){U(null),s("".concat(w.gA.ACCOUNT))},entity:"Service Account"}),(0,g.jsxs)(d.ZP,{item:!0,xs:12,children:[(0,g.jsx)(m.Z,{label:(0,g.jsx)(b.Z,{to:w.gA.ACCOUNT,label:"Service Accounts"})}),(0,g.jsx)(f.Z,{children:(0,g.jsxs)(u.Z,{sx:{display:"grid",padding:"25px",gap:"25px",gridTemplateColumns:{md:"2fr 1.2fr",xs:"1fr"},border:"1px solid #eaeaea"},children:[(0,g.jsxs)(u.Z,{children:[(0,g.jsx)(N.Z,{icon:(0,g.jsx)(x.tVY,{}),children:"Create Service Account"}),(0,g.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),v(!0)}(e)},children:(0,g.jsxs)(d.ZP,{container:!0,item:!0,spacing:"20",sx:{marginTop:1},children:[(0,g.jsx)(d.ZP,{item:!0,xs:12,children:(0,g.jsx)(d.ZP,{container:!0,item:!0,spacing:"20",children:(0,g.jsx)(d.ZP,{item:!0,xs:12,children:(0,g.jsxs)(d.ZP,{container:!0,children:[(0,g.jsx)(d.ZP,{item:!0,xs:1,children:(0,g.jsx)(x.tvm,{})}),(0,g.jsx)(d.ZP,{item:!0,children:(0,g.jsxs)(d.ZP,{container:!0,item:!0,spacing:"20",children:[(0,g.jsxs)(d.ZP,{item:!0,xs:12,children:[" ",(0,g.jsx)("div",{className:t.stackedInputs,children:(0,g.jsx)(y.Z,{value:I,label:"Access Key",id:"accessKey",name:"accessKey",placeholder:"Enter Access Key",onChange:function(e){z(e.target.value)}})})]}),(0,g.jsx)(d.ZP,{item:!0,xs:12,children:(0,g.jsx)("div",{className:t.stackedInputs,children:(0,g.jsx)(y.Z,{value:D,label:"Secret Key",id:"secretKey",name:"secretKey",type:q?"text":"password",placeholder:"Enter Secret Key",onChange:function(e){R(e.target.value)},overlayIcon:q?(0,g.jsx)(C.Z,{}):(0,g.jsx)(S.Z,{}),overlayAction:function(){return X(!q)}})})})]})})]})})})}),(0,g.jsxs)(d.ZP,{container:!0,item:!0,spacing:"20",children:[(0,g.jsx)(d.ZP,{item:!0,xs:12,children:(0,g.jsxs)(d.ZP,{container:!0,children:[(0,g.jsx)(d.ZP,{item:!0,xs:1,children:(0,g.jsx)(x.v42,{})}),(0,g.jsx)(d.ZP,{item:!0,xs:11,children:(0,g.jsx)(j.Z,{value:"serviceAccountPolicy",id:"serviceAccountPolicy",name:"serviceAccountPolicy",checked:_,onChange:function(e){J(e.target.checked)},label:"Restrict beyond user policy",tooltip:"You can specify an optional JSON-formatted IAM policy to further restrict Service Account access to a subset of the actions and resources explicitly allowed for the parent user. Additional access beyond that of the parent user cannot be implemented through these policies."})})]})}),_&&(0,g.jsxs)(d.ZP,{item:!0,xs:12,className:t.codeMirrorContainer,children:[(0,g.jsx)("div",{children:(0,g.jsx)(M.Z,{children:"Current User Policy - edit the JSON to remove permissions for this service account"})}),(0,g.jsx)(d.ZP,{item:!0,xs:12,className:t.formScrollable,children:(0,g.jsx)(h.Z,{value:te,onBeforeChange:function(e,t,n){ne(n)},editorHeight:"350px"})})]})]}),(0,g.jsxs)(d.ZP,{item:!0,xs:12,className:t.modalButtonBar,children:[(0,g.jsx)(p.Z,{type:"button",variant:"outlined",color:"primary",onClick:function(){ne(""),U(null),z(""),R(""),X(!1)},children:"Clear"}),(0,g.jsx)(p.Z,{type:"submit",variant:"contained",color:"primary",children:"Create"})]})]})})]}),(0,g.jsx)(Z,{})]})})]})]})}))},37798:function(e,t,n){n.r(t),n.d(t,{default:function(){return S}});var i=n(1413),s=n(72791),o=n(26181),r=n.n(o),c=n(11135),a=n(25787),l=n(56028),d=n(61889),u=n(77196),p=n(63466),x=n(85531),h=n(78029),m=n.n(h),f=n(15900),y=n(23814),j=n(80184),g=(0,a.Z)((function(e){return(0,c.Z)({container:{display:"flex",flexFlow:"column",padding:"20px 0 8px 0"},inputWithCopy:{"& .MuiInputBase-root ":{width:"100%",background:"#FBFAFA","& .MuiInputBase-input":{height:".8rem"},"& .MuiInputAdornment-positionEnd":{marginRight:".5rem","& .MuiButtonBase-root":{height:"2rem"}}},"& .MuiButtonBase-root .min-icon":{width:".8rem",height:".8rem"}},inputLabel:(0,i.Z)((0,i.Z)({},y.YI.inputLabel),{},{fontSize:".8rem"})})}))((function(e){var t=e.label,n=void 0===t?"":t,i=e.value,s=void 0===i?"":i,o=e.classes,r=void 0===o?{}:o;return(0,j.jsxs)("div",{className:r.container,children:[(0,j.jsxs)("div",{className:r.inputLabel,children:[n,":"]}),(0,j.jsx)("div",{className:r.inputWithCopy,children:(0,j.jsx)(u.Z,{value:s,readOnly:!0,endAdornment:(0,j.jsx)(p.Z,{position:"end",children:(0,j.jsx)(m(),{text:s,children:(0,j.jsx)(x.Z,{"aria-label":"copy",tooltip:"Copy",onClick:function(){},onMouseDown:function(){},edge:"end",children:(0,j.jsx)(f.TIy,{})})})})})})]})})),v=n(89357),Z=n(40603),b=function(e,t){var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+t),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)},S=(0,a.Z)((function(e){return(0,c.Z)({warningBlock:{color:"red",fontSize:".85rem",margin:".5rem 0 .5rem 0",display:"flex",alignItems:"center","& svg ":{marginRight:".3rem",height:16,width:16}},credentialTitle:{padding:".8rem 0 0 0",fontWeight:600,fontSize:".9rem"},buttonContainer:{textAlign:"right",marginTop:"1rem"},credentialsPanel:{overflowY:"auto",maxHeight:350},promptTitle:{display:"flex",alignItems:"center"},buttonSpacer:{marginRight:".9rem"}})}))((function(e){var t=e.classes,n=e.newServiceAccount,o=e.open,c=e.closeModal,a=e.entity;if(!n)return null;var u=r()(n,"console",null),p=r()(n,"idp",!1);return(0,j.jsx)(l.Z,{modalOpen:o,onClose:function(){c()},title:(0,j.jsx)("div",{className:t.promptTitle,children:(0,j.jsxs)("div",{children:["New ",a," Created"]})}),titleIcon:(0,j.jsx)(f.tVY,{}),children:(0,j.jsxs)(d.ZP,{container:!0,children:[(0,j.jsxs)(d.ZP,{item:!0,xs:12,className:t.formScrollable,children:["A new ",a," has been created with the following details:",!p&&u&&(0,j.jsx)(s.Fragment,{children:(0,j.jsxs)(d.ZP,{item:!0,xs:12,className:t.credentialsPanel,children:[(0,j.jsx)("div",{className:t.credentialTitle,children:"Console Credentials"}),Array.isArray(u)&&u.map((function(e,t){return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{label:"Access Key",value:e.accessKey}),(0,j.jsx)(g,{label:"Secret Key",value:e.secretKey})]})})),!Array.isArray(u)&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{label:"Access Key",value:u.accessKey}),(0,j.jsx)(g,{label:"Secret Key",value:u.secretKey})]})]})}),(null===u||void 0===u)&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{label:"Access Key",value:n.accessKey||""}),(0,j.jsx)(g,{label:"Secret Key",value:n.secretKey||""})]}),p?(0,j.jsx)("div",{className:t.warningBlock,children:"Please Login via the configured external identity provider."}):(0,j.jsxs)("div",{className:t.warningBlock,children:[(0,j.jsx)(v.Z,{}),(0,j.jsx)("span",{children:"Write these down, as this is the only time the secret will be displayed."})]})]}),(0,j.jsx)(d.ZP,{item:!0,xs:12,className:t.buttonContainer,children:!p&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Z.Z,{id:"download-button",tooltip:"Download credentials in a JSON file formatted for import using mc alias import. This will only include the default login credentials.",text:"Download for import",className:t.buttonSpacer,onClick:function(){var e={};u?e=Array.isArray(u)?u.map((function(e){return{url:e.url,accessKey:e.accessKey,secretKey:e.secretKey,api:"s3v4",path:"auto"}}))[0]:{url:u.url,accessKey:u.accessKey,secretKey:u.secretKey,api:"s3v4",path:"auto"}:e={url:n.url,accessKey:n.accessKey,secretKey:n.secretKey,api:"s3v4",path:"auto"};b("credentials.json",JSON.stringify((0,i.Z)({},e)))},icon:(0,j.jsx)(f._8t,{}),variant:"contained",color:"primary"}),Array.isArray(u)&&u.length>1&&(0,j.jsx)(Z.Z,{id:"download-all-button",tooltip:"Download all access credentials to a JSON file. NOTE: This file is not formatted for import using mc alias import. If you plan to import this alias from the file, please use the Download for Import button. ",text:"Download all access credentials",className:t.buttonSpacer,onClick:function(){var e={};u&&(e=u.map((function(e){return{accessKey:e.accessKey,secretKey:e.secretKey}})));b("all_credentials.json",JSON.stringify((0,i.Z)({},e)))},icon:(0,j.jsx)(f._8t,{}),variant:"contained",color:"primary"})]})})]})})}))},92217:function(e,t,n){var i=n(1413),s=n(72791),o=n(61889),r=n(30829),c=n(20068),a=n(64554),l=n(11135),d=n(25787),u=n(84570),p=n(23814),x=n(15900),h=n(40603),m=n(78029),f=n.n(m),y=n(85457),j=n(80184);t.Z=(0,d.Z)((function(e){return(0,l.Z)((0,i.Z)({},p.YI))}))((function(e){var t=e.value,n=e.label,i=void 0===n?"":n,l=e.tooltip,d=void 0===l?"":l,p=e.mode,m=void 0===p?"json":p,g=e.classes,v=e.onBeforeChange,Z=(e.readOnly,e.editorHeight),b=void 0===Z?"250px":Z;return(0,j.jsxs)(s.Fragment,{children:[(0,j.jsx)(o.ZP,{item:!0,xs:12,children:(0,j.jsxs)(r.Z,{className:g.inputLabel,children:[(0,j.jsx)("span",{children:i}),""!==d&&(0,j.jsx)("div",{className:g.tooltipContainer,children:(0,j.jsx)(c.Z,{title:d,placement:"top-start",children:(0,j.jsx)("div",{className:g.tooltip,children:(0,j.jsx)(u.Z,{})})})})]})}),(0,j.jsx)(o.ZP,{item:!0,xs:12,style:{maxHeight:b,overflow:"auto"},children:(0,j.jsx)(y.Z,{value:t,language:m,onChange:function(e){v(null,null,e.target.value)},id:"code_wrapper",padding:15,style:{fontSize:12,backgroundColor:"#fefefe",fontFamily:"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace"}})}),(0,j.jsx)(o.ZP,{item:!0,xs:12,sx:{borderTop:"1px solid #eaeaea",background:"#f7f7f7"},children:(0,j.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",padding:"2px",paddingRight:"5px",justifyContent:"flex-end","& button":{height:"26px",width:"26px",padding:"2px"," .min-icon":{marginLeft:"0"}}},children:(0,j.jsx)(f(),{text:t,children:(0,j.jsx)(h.Z,{tooltip:"Copy to Clipboard",onClick:function(){},text:"",icon:(0,j.jsx)(x.TIy,{}),color:"primary",variant:"outlined"})})})})]})}))},56028:function(e,t,n){var i=n(29439),s=n(1413),o=n(72791),r=n(60364),c=n(13400),a=n(55646),l=n(5574),d=n(65661),u=n(39157),p=n(11135),x=n(25787),h=n(23814),m=n(81551),f=n(29823),y=n(28057),j=n(87995),g=n(80184);t.Z=(0,x.Z)((function(e){return(0,p.Z)((0,s.Z)((0,s.Z)({},h.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},h.sN))}))((function(e){var t=e.onClose,n=e.modalOpen,p=e.title,x=e.children,h=e.classes,v=e.wideLimit,Z=void 0===v||v,b=e.noContentPadding,S=e.titleIcon,C=void 0===S?null:S,w=(0,m.TL)(),A=(0,o.useState)(!1),K=(0,i.Z)(A,2),N=K[0],P=K[1],M=(0,r.v9)((function(e){return e.system.modalSnackBar}));(0,o.useEffect)((function(){w((0,j.MK)(""))}),[w]),(0,o.useEffect)((function(){if(M){if(""===M.message)return void P(!1);"error"!==M.type&&P(!0)}}),[M]);var k=Z?{classes:{paper:h.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},O="";return M&&(O=M.detailedErrorMsg,(""===M.detailedErrorMsg||M.detailedErrorMsg.length<5)&&(O=M.message)),(0,g.jsxs)(l.Z,(0,s.Z)((0,s.Z)({open:n,classes:h},k),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&t()},className:h.root,children:[(0,g.jsxs)(d.Z,{className:h.title,children:[(0,g.jsxs)("div",{className:h.titleText,children:[C," ",p]}),(0,g.jsx)("div",{className:h.closeContainer,children:(0,g.jsx)(c.Z,{"aria-label":"close",id:"close",className:h.closeButton,onClick:t,disableRipple:!0,size:"small",children:(0,g.jsx)(f.Z,{})})})]}),(0,g.jsx)(y.Z,{isModal:!0}),(0,g.jsx)(a.Z,{open:N,className:h.snackBarModal,onClose:function(){P(!1),w((0,j.MK)(""))},message:O,ContentProps:{className:"".concat(h.snackBar," ").concat(M&&"error"===M.type?h.errorSnackBar:"")},autoHideDuration:M&&"error"===M.type?1e4:5e3}),(0,g.jsx)(u.Z,{className:b?"":h.content,children:x})]}))}))},60680:function(e,t,n){n(72791);var i=n(11135),s=n(25787),o=n(80184);t.Z=(0,s.Z)((function(e){return(0,i.Z)({root:{padding:0,margin:0,fontSize:".9rem"}})}))((function(e){var t=e.classes,n=e.children;return(0,o.jsx)("h1",{className:t.root,children:n})}))},3579:function(e,t,n){var i=n(95318);t.Z=void 0;var s=i(n(45649)),o=n(80184),r=(0,s.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"RemoveRedEye");t.Z=r},20165:function(e,t,n){var i=n(95318);t.Z=void 0;var s=i(n(45649)),o=n(80184),r=(0,s.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");t.Z=r},61120:function(e,t,n){function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}n.d(t,{Z:function(){return i}})},60136:function(e,t,n){n.d(t,{Z:function(){return s}});var i=n(89611);function s(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,i.Z)(e,t)}},82963:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(71002),s=n(97326);function o(e,t){if(t&&("object"===(0,i.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,s.Z)(e)}}}]);
|
|
//# sourceMappingURL=1199.ae4c29a1.chunk.js.map
|