Files
object-browser/portal-ui/build/static/js/2433.cd24fabf.chunk.js
Alex fa1f84bd0a Release v0.25.1 (#2723)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-17 17:34:30 -07:00

2 lines
6.8 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2433],{65935:function(e,s,t){t.r(s),t.d(s,{default:function(){return N}});var n=t(29439),i=t(1413),c=t(72791),o=t(57689),a=t(75952),r=t(11135),l=t(25787),d=t(23814),x=t(61889),p=t(64554),u=t(92217),h=t(74794),m=t(21435),y=t(81159),f=t(80184),j=function(e){var s=e.icon,t=e.description;return(0,f.jsxs)(p.Z,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[s," ",(0,f.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:t})]})},Z=function(){return(0,f.jsxs)(p.Z,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px",marginTop:{xs:"0px"}},children:[(0,f.jsxs)(p.Z,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px",paddingBottom:"20px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,f.jsx)(a.M9A,{}),(0,f.jsx)("div",{children:"Learn more about Access Keys"})]}),(0,f.jsxs)(p.Z,{sx:{fontSize:"14px",marginBottom:"15px"},children:[(0,f.jsxs)(p.Z,{sx:{paddingBottom:"20px"},children:[(0,f.jsx)(j,{icon:(0,f.jsx)(a.nO6,{}),description:"Create Access Keys"}),(0,f.jsx)(p.Z,{sx:{paddingTop:"20px"},children:"Access Keys inherit the policies explicitly attached to the parent user, and the policies attached to each group in which the parent user has membership."})]}),(0,f.jsxs)(p.Z,{sx:{paddingBottom:"20px"},children:[(0,f.jsx)(j,{icon:(0,f.jsx)(a.tvm,{}),description:"Assign Custom Credentials"}),(0,f.jsx)(p.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 Access Key, you will be given the opportunity to view and download the account credentials."}),(0,f.jsx)(p.Z,{sx:{paddingTop:"10px"},children:"Access Keys support programmatic access by applications. You cannot use a Access Key to log into the MinIO Console."})]}),(0,f.jsxs)(p.Z,{sx:{paddingBottom:"20px"},children:[(0,f.jsx)(j,{icon:(0,f.jsx)(a.v42,{}),description:"Assign Access Policies"}),(0,f.jsx)(p.Z,{sx:{paddingTop:"10px"},children:"You can specify an optional JSON-formatted IAM policy to further restrict Access Key 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,f.jsx)(p.Z,{sx:{paddingTop:"10px"},children:"You cannot modify the optional Access Key IAM policy after saving."})]})]}),(0,f.jsx)(p.Z,{sx:{display:"flex",flexFlow:"column"}})]})},g=t(3579),v=t(20165),A=t(56087),b=t(81207),K=t(37798),P=t(50896),C=t(60680),S=t(87995),w=t(81551),k=t(47974),T=t(45248),N=(0,l.Z)((function(e){return(0,r.Z)((0,i.Z)((0,i.Z)({},d.DF),d.ID))}))((function(e){var s=e.classes,t=(0,w.TL)(),i=(0,o.s0)(),r=(0,c.useState)(!1),l=(0,n.Z)(r,2),d=l[0],j=l[1],N=(0,c.useState)((0,T.zO)(16)),O=(0,n.Z)(N,2),I=O[0],B=O[1],z=(0,c.useState)((0,T.zO)(32)),E=(0,n.Z)(z,2),M=E[0],Y=E[1],J=(0,c.useState)(!1),R=(0,n.Z)(J,2),F=R[0],D=R[1],U=(0,c.useState)(null),L=(0,n.Z)(U,2),V=L[0],_=L[1],G=(0,c.useState)(!1),H=(0,n.Z)(G,2),W=H[0],q=H[1],Q=(0,c.useState)(""),X=(0,n.Z)(Q,2),$=X[0],ee=X[1];(0,c.useEffect)((function(){d&&b.Z.invoke("POST","/api/v1/service-account-credentials",{policy:$,accessKey:I,secretKey:M}).then((function(e){j(!1),_({accessKey:e.accessKey||"",secretKey:e.secretKey||"",url:e.url||""})})).catch((function(e){j(!1),t((0,S.Ih)(e))}))}),[d,j,t,$,I,M]),(0,c.useEffect)((function(){F&&b.Z.invoke("GET","/api/v1/user/policy").then((function(e){ee(JSON.stringify(JSON.parse(e),null,4))}))}),[F]);return(0,f.jsxs)(c.Fragment,{children:[null!==V&&(0,f.jsx)(K.Z,{newServiceAccount:V,open:null!==V,closeModal:function(){_(null),i("".concat(A.gA.ACCOUNT))},entity:"Access Key"}),(0,f.jsxs)(x.ZP,{item:!0,xs:12,children:[(0,f.jsx)(k.Z,{label:(0,f.jsx)(a.hbI,{label:"Access Keys",onClick:function(){return i(A.gA.ACCOUNT)}})}),(0,f.jsx)(h.Z,{children:(0,f.jsxs)(p.Z,{sx:{display:"grid",padding:"25px",gap:"25px",gridTemplateColumns:{md:"2fr 1.2fr",xs:"1fr"},border:"1px solid #eaeaea"},children:[(0,f.jsxs)(p.Z,{children:[(0,f.jsx)(P.Z,{icon:(0,f.jsx)(a.tVY,{}),children:"Create Access Key"}),(0,f.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),j(!0)}(e)},children:(0,f.jsxs)(x.ZP,{container:!0,item:!0,spacing:"20",sx:{marginTop:1},children:[(0,f.jsx)(x.ZP,{item:!0,xs:12,children:(0,f.jsx)(x.ZP,{container:!0,item:!0,spacing:"20",children:(0,f.jsx)(x.ZP,{item:!0,xs:12,children:(0,f.jsxs)(x.ZP,{container:!0,children:[(0,f.jsx)(x.ZP,{item:!0,xs:1,children:(0,f.jsx)(a.tvm,{})}),(0,f.jsx)(x.ZP,{item:!0,children:(0,f.jsxs)(x.ZP,{container:!0,item:!0,spacing:"20",children:[(0,f.jsxs)(x.ZP,{item:!0,xs:12,children:[" ",(0,f.jsx)("div",{className:s.stackedInputs,children:(0,f.jsx)(m.Z,{value:I,label:"Access Key",id:"accessKey",name:"accessKey",placeholder:"Enter Access Key",onChange:function(e){B(e.target.value)}})})]}),(0,f.jsx)(x.ZP,{item:!0,xs:12,children:(0,f.jsx)("div",{className:s.stackedInputs,children:(0,f.jsx)(m.Z,{value:M,label:"Secret Key",id:"secretKey",name:"secretKey",type:W?"text":"password",placeholder:"Enter Secret Key",onChange:function(e){Y(e.target.value)},overlayIcon:W?(0,f.jsx)(v.Z,{}):(0,f.jsx)(g.Z,{}),overlayAction:function(){return q(!W)}})})})]})})]})})})}),(0,f.jsxs)(x.ZP,{container:!0,item:!0,spacing:"20",children:[(0,f.jsx)(x.ZP,{item:!0,xs:12,children:(0,f.jsxs)(x.ZP,{container:!0,children:[(0,f.jsx)(x.ZP,{item:!0,xs:1,children:(0,f.jsx)(a.v42,{})}),(0,f.jsx)(x.ZP,{item:!0,xs:11,children:(0,f.jsx)(y.Z,{value:"serviceAccountPolicy",id:"serviceAccountPolicy",name:"serviceAccountPolicy",checked:F,onChange:function(e){D(e.target.checked)},label:"Restrict beyond user policy",tooltip:"You can specify an optional JSON-formatted IAM policy to further restrict Access Key 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."})})]})}),F&&(0,f.jsxs)(x.ZP,{item:!0,xs:12,className:s.codeMirrorContainer,children:[(0,f.jsx)("div",{children:(0,f.jsx)(C.Z,{children:"Current User Policy - edit the JSON to remove permissions for this Access Key"})}),(0,f.jsx)(x.ZP,{item:!0,xs:12,className:s.formScrollable,children:(0,f.jsx)(u.Z,{value:$,onBeforeChange:function(e,s,t){ee(t)},editorHeight:"350px"})})]})]}),(0,f.jsxs)(x.ZP,{item:!0,xs:12,className:s.modalButtonBar,children:[(0,f.jsx)(a.zxk,{id:"clear",type:"button",variant:"regular",onClick:function(){ee(""),_(null),B(""),Y(""),q(!1)},label:"Clear"}),(0,f.jsx)(a.zxk,{id:"create-sa",type:"submit",variant:"callAction",color:"primary",label:"Create"})]})]})})]}),(0,f.jsx)(Z,{})]})})]})]})}))}}]);
//# sourceMappingURL=2433.cd24fabf.chunk.js.map