...
 
Commits (3)
......@@ -113,6 +113,7 @@ func setFlags(cmd *cobra.Command, production bool) error {
}
flags.StringSlice("issue-perms", nil, issHelp)
flags.StringSlice("revoke-perms", nil, "list of credentials that all requestors may revoke")
flags.Bool("skip-private-keys-check", false, "whether or not to skip checking whether the private keys that requestors have permission for using are present in the configuration")
flags.String("static-sessions", "", "preconfigured static sessions (in JSON)")
flags.Lookup("no-auth").Header = `Requestor authentication and default requestor permissions`
......@@ -227,6 +228,7 @@ func configureServer(cmd *cobra.Command) error {
Issuing: handlePermission("issue-perms"),
Revoking: handlePermission("revoke-perms"),
},
SkipPrivateKeysCheck: viper.GetBool("skip-private-keys-check"),
ListenAddress: viper.GetString("listen-addr"),
Port: viper.GetInt("port"),
ClientListenAddress: viper.GetString("client-listen-addr"),
......
......@@ -8,7 +8,7 @@ import (
"strings"
"github.com/go-errors/errors"
"github.com/privacybydesign/irmago"
irma "github.com/privacybydesign/irmago"
"github.com/privacybydesign/irmago/internal/common"
"github.com/privacybydesign/irmago/server"
)
......@@ -17,7 +17,8 @@ type Configuration struct {
*server.Configuration `mapstructure:",squash"`
// Disclosing, signing or issuance permissions that apply to all requestors
Permissions `mapstructure:",squash"`
Permissions `mapstructure:",squash"`
SkipPrivateKeysCheck bool `json:"skip_private_keys_check" mapstructure:"skip_private_keys_check"`
// Whether or not incoming session requests should be authenticated. If false, anyone
// can submit session requests. If true, the request is first authenticated against the
......@@ -328,7 +329,7 @@ func (conf *Configuration) validatePermissionSet(requestor string, requestorperm
errs = append(errs, fmt.Sprintf("%s %s permission '%s': unknown credential type", requestor, typ, permission))
continue
}
if typ == "issuing" || typ == "revoking" {
if (typ == "issuing" || typ == "revoking") && !conf.SkipPrivateKeysCheck {
sk, err := conf.IrmaConfiguration.PrivateKeyLatest(credtype.IssuerIdentifier())
if err != nil {
errs = append(errs, fmt.Sprintf("%s %s permission '%s': failed to load private key: %s", requestor, typ, permission, err))
......
......@@ -5,4 +5,4 @@
package irma
// Version of the IRMA command line and libraries
const Version = "0.5.0-rc.1"
const Version = "0.5.0-rc.2"