dcfd29419e
Our NTLM support has been known to be broken in various situations for a while, specifically on Windows. The core team is unable to troubleshoot these problems, and nobody has stepped up to maintain the NTLM support. In addition, NTLM uses cryptography and security techniques that are known to be insecure, such as the algorithms DES, MD4, and MD5, as well as simple, unsalted hashes of passwords. Since we now support Kerberos, most users should be able to replace their use of NTLM with Kerberos instead. Users have reported this working on Windows and it is known to work well on at least Debian as well. Drop support for NTLM and remove it from the codebase.
34 lines
658 B
Go
34 lines
658 B
Go
package creds
|
|
|
|
type AccessMode string
|
|
|
|
const (
|
|
NoneAccess AccessMode = "none"
|
|
BasicAccess AccessMode = "basic"
|
|
PrivateAccess AccessMode = "private"
|
|
NegotiateAccess AccessMode = "negotiate"
|
|
EmptyAccess AccessMode = ""
|
|
)
|
|
|
|
type Access struct {
|
|
mode AccessMode
|
|
url string
|
|
}
|
|
|
|
func NewAccess(mode AccessMode, url string) Access {
|
|
return Access{url: url, mode: mode}
|
|
}
|
|
|
|
// Returns a copy of an AccessMode with the mode upgraded to newMode
|
|
func (a *Access) Upgrade(newMode AccessMode) Access {
|
|
return Access{url: a.url, mode: newMode}
|
|
}
|
|
|
|
func (a *Access) Mode() AccessMode {
|
|
return a.mode
|
|
}
|
|
|
|
func (a *Access) URL() string {
|
|
return a.url
|
|
}
|