LOTS of security fixes of containers and other versions

This commit is contained in:
frikky
2021-10-14 23:00:07 +02:00
parent 66ed72b241
commit 435454ca78
19 changed files with 1696 additions and 157 deletions
+7 -7
View File
@@ -9332,29 +9332,29 @@ const AngularWorkflow = (props) => {
<div style={{flex: 3, borderLeft: `1px solid ${inputColor}`, padding: "70px 30px 30px 30px", maxHeight: 630, minHeight: 630, overflowY: "auto", overflowX: "hidden"}}>
{selectedApp.documentation === undefined || selectedApp.documentation === null || selectedApp.documentation.length === 0 ?
<span style={{textAlign: "center", }}>
<Typography variant="h6">
Description: {selectedApp.description}
<Typography variant="body1" style={{marginLeft: 25, marginRight: 25}}>
{selectedApp.description}
</Typography>
<Divider style={{marginTop: 25, marginBottom: 25, backgroundColor: inputColor, }} />
<Typography variant="h4">
<Typography variant="h6">
There is currently no extended documentation available for this app.
</Typography>
<Typography variant="h6" style={{marginTop: 25}}>
<Typography variant="body1" style={{marginTop: 25}}>
Want help with this app? <a rel="norefferer" target="_blank" href="https://discord.gg/B2CBzUm" style={{textDecoration: "none", color: "#f86a3e"}}>Join the Discord!</a>
</Typography>
<Typography variant="h4" style={{marginTop: 50,}}>
<Typography variant="h6" style={{marginTop: 50,}}>
Want to help change this app?
</Typography>
{selectedApp.reference_info === undefined || selectedApp.reference_info === null || selectedApp.reference_info.github_url === undefined || selectedApp.reference_info.github_url === null || selectedApp.reference_info.github_url.length === 0 ?
<span>
<Typography variant="h6" style={{marginTop: 25}}>
<Typography variant="body1" style={{marginTop: 25}}>
<a rel="norefferer" target="_blank" href={"https://github.com/frikky/shuffle-apps"} style={{textDecoration: "none", color: "#f86a3e"}}>Check it out on Github!</a>
</Typography>
</span>
:
<span>
<Typography variant="h6" style={{marginTop: 25}}>
<Typography variant="body1" style={{marginTop: 25}}>
<a rel="norefferer" target="_blank" href={selectedApp.reference_info.github_url} style={{textDecoration: "none", color: "#f86a3e"}}>Check it out on Github!</a>
</Typography>
</span>
+46 -5
View File
@@ -201,8 +201,7 @@ const AppCreator = (props) => {
const increaseAmount = 50
const actionNonBodyRequest = ["GET", "HEAD", "DELETE", "CONNECT"]
const actionBodyRequest = ["POST", "PUT", "PATCH",]
//const authenticationOptions = ["No authentication", "API key", "Bearer auth", "Basic auth", "JWT", "Oauth2"]
const authenticationOptions = ["No authentication", "API key", "Bearer auth", "Basic auth", "Oauth2"]
const authenticationOptions = ["No authentication", "API key", "Bearer auth", "Basic auth", "Oauth2", "JWT"]
const apikeySelection = ["Header", "Query",]
const [name, setName] = useState("");
@@ -1004,8 +1003,15 @@ const AppCreator = (props) => {
//if (Object.entries(securitySchemes) > 1 &&
var newauth = []
for (const [key, value] of Object.entries(securitySchemes)) {
//console.log(key, value)
if (value.scheme === "bearer") {
console.log(key, value)
if (key === "jwt") {
setAuthenticationOption("JWT")
setAuthenticationRequired(true)
if (value.in !== undefined && value.in !== null && value.in.length > 0) {
setParameterName(value.in)
}
} else if (value.scheme === "bearer") {
setAuthenticationOption("Bearer auth")
setAuthenticationRequired(true)
} else if (key === "Oauth2" || key === "Oauth2c") {
@@ -1531,11 +1537,14 @@ const AppCreator = (props) => {
"bearerFormat": "UUID",
}
} else if (authenticationOption === "JWT") {
data.components.securitySchemes["BearerAuth"] = {
data.components.securitySchemes["jwt"] = {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
"in": parameterName,
}
console.log("SECURITYSCHEMES: ", data.components)
} else if (authenticationOption === "Basic auth") {
data.components.securitySchemes["BasicAuth"] = {
"type": "http",
@@ -1853,6 +1862,37 @@ const AppCreator = (props) => {
})}
</div>
const jwtAuth = authenticationOption === "JWT" ?
<div style={{color: "white", marginTop: 20, }}>
<Typography variant="body1">JWT authentication</Typography>
<Typography variant="body2" color="textSecondary" style={{marginTop: 10,}}>
Authentication path
</Typography>
<TextField
required
style={{margin: 0, flex: "1", backgroundColor: inputColor}}
fullWidth={true}
placeholder="/security/user/authenticate"
type="name"
id="standard-required"
margin="normal"
variant="outlined"
defaultValue={parameterName}
helperText={<span style={{color:"white", marginBottom: "2px",}}>Must start with / and be a valid path</span>}
onBlur={e => setParameterName(e.target.value)}
InputProps={{
classes: {
notchedOutline: classes.notchedOutline,
},
style:{
color: "white",
},
}}
/>
</div>
:
null
const oauth2Auth = authenticationOption === "Oauth2" ?
<div style={{color: "white", marginTop: 20, }}>
<Typography variant="body1">Oauth2 authentication</Typography>
@@ -3680,6 +3720,7 @@ const AppCreator = (props) => {
{bearerAuth}
{apiKey}
{oauth2Auth}
{jwtAuth}
{extraKeys}
{/*authenticationOption === "No authentication" ? null :