Object Browser only mode (#2157)

- Added flag CONSOLE_OBJECT_BROWSER_ONLY=on to trigger between console mode & Object Browser only
- Hidden not necessary buttons for object browse
- STS Login

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Alex
2022-07-07 14:28:25 -05:00
committed by GitHub
parent e48958f5a0
commit cf0e326b82
22 changed files with 929 additions and 495 deletions

View File

@@ -67,11 +67,18 @@ type TokenClaims struct {
STSSessionToken string `json:"stsSessionToken,omitempty"`
AccountAccessKey string `json:"accountAccessKey,omitempty"`
HideMenu bool `json:"hm,omitempty"`
ObjectBrowser bool `json:"ob,omitempty"`
}
// STSClaims claims struct for STS Token
type STSClaims struct {
AccessKey string `json:"accessKey,omitempty"`
}
// SessionFeatures represents features stored in the session
type SessionFeatures struct {
HideMenu bool
HideMenu bool
ObjectBrowser bool
}
// SessionTokenAuthenticate takes a session token, decode it, extract claims and validate the signature
@@ -115,6 +122,7 @@ func NewEncryptedTokenForClient(credentials *credentials.Value, accountAccessKey
}
if features != nil {
tokenClaims.HideMenu = features.HideMenu
tokenClaims.ObjectBrowser = features.ObjectBrowser
}
encryptedClaims, err := encryptClaims(tokenClaims)
if err != nil {