-
Notifications
You must be signed in to change notification settings - Fork 29
/
macaroons.go
29 lines (24 loc) · 910 Bytes
/
macaroons.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package frdrpcserver
import (
"time"
)
const (
// faradayMacaroonLocation is the value we use for the faraday
// macaroons' "Location" field when baking them.
faradayMacaroonLocation = "faraday"
// macDatabaseOpenTimeout is how long we wait for acquiring the lock on
// the macaroon database before we give up with an error.
macDatabaseOpenTimeout = time.Second * 5
)
var (
// macDbDefaultPw is the default encryption password used to encrypt the
// faraday macaroon database. The macaroon service requires us to set a
// non-nil password so we set it to an empty string. This will cause the
// keys to be encrypted on disk but won't provide any security at all as
// the password is known to anyone.
//
// TODO(guggero): Allow the password to be specified by the user. Needs
// create/unlock calls in the RPC. Using a password should be optional
// though.
macDbDefaultPw = []byte("")
)