diff --git a/go.mod b/go.mod index f07cb1c9c4..a389cf138e 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect github.com/go-test/deep v1.0.6 // indirect + github.com/gofrs/uuid v3.2.0+incompatible github.com/gogo/protobuf v1.3.1 // indirect github.com/golang/protobuf v1.4.1 github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect @@ -27,6 +28,7 @@ require ( github.com/rs/zerolog v1.17.2 github.com/spf13/viper v1.6.3 github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect + github.com/tredoe/osutil v1.0.5 google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb honnef.co/go/tools v0.0.1-2020.1.0.20200427215036-cd1ad299aeab // indirect ) diff --git a/go.sum b/go.sum index af773073ee..b06f9ae12d 100644 --- a/go.sum +++ b/go.sum @@ -765,6 +765,10 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc h1:yUaosF github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/transip/gotransip v0.0.0-20190812104329-6d8d9179b66f/go.mod h1:i0f4R4o2HM0m3DZYQWsj6/MEowD57VzoH0v3d7igeFY= +github.com/tredoe/fileutil v1.0.0/go.mod h1:PBayWPFCURwkmW0u6E8E8C6Jtd9ZzWq/U1iMa6BLRPg= +github.com/tredoe/goutil v0.0.0-20200111155331-68cefb6d3cdc/go.mod h1:dp4VPOLeEFYbsf1ikgd+uytWDnpCdMiTHMg6mh7hHuQ= +github.com/tredoe/osutil v1.0.5 h1:mfXjHBJU46GoJDOUcHyV895fauUuVikR9U8yRbGBrqw= +github.com/tredoe/osutil v1.0.5/go.mod h1:DDO4G4Mwys6NJi5JmEVLnfFbQWIfVVri8L6HuXb/v98= github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= diff --git a/pkg/proto/v0/accounts.pb.go b/pkg/proto/v0/accounts.pb.go index ff52efda74..ac05a115ab 100644 --- a/pkg/proto/v0/accounts.pb.go +++ b/pkg/proto/v0/accounts.pb.go @@ -372,7 +372,8 @@ type Account struct { DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // The username // posixaccount MUST uid - Username string `protobuf:"bytes,7,opt,name=username,proto3" json:"username,omitempty"` + PreferredName string `protobuf:"bytes,7,opt,name=preferred_name,json=preferredName,proto3" json:"preferred_name,omitempty"` + // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users // used for exposing the user using ldap // posixaccount MUST uidnumber UidNumber int64 `protobuf:"varint,8,opt,name=uid_number,json=uidNumber,proto3" json:"uid_number,omitempty"` @@ -512,9 +513,9 @@ func (m *Account) GetDisplayName() string { return "" } -func (m *Account) GetUsername() string { +func (m *Account) GetPreferredName() string { if m != nil { - return m.Username + return m.PreferredName } return "" } @@ -1684,128 +1685,128 @@ func init() { func init() { proto.RegisterFile("accounts.proto", fileDescriptor_e1e7723af4c007b7) } var fileDescriptor_e1e7723af4c007b7 = []byte{ - // 1955 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xeb, 0x6e, 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 0x59, 0x65, 0xbd, 0x8a, - 0xbd, 0x72, 0x86, 0x90, 0x07, 0xf3, 0x99, 0x3c, 0x45, 0x0d, 0xa3, 0x2f, 0x07, 0x34, 0x6b, 0x79, - 0x05, 0x0f, 0x24, 0xe8, 0x1d, 0x7b, 0xa7, 0x04, 0x7a, 0xa8, 0x75, 0xd2, 0xe1, 0x5d, 0x8a, 0xdb, - 0xa2, 0x06, 0x3d, 0x58, 0x30, 0xf5, 0xad, 0xb9, 0x8d, 0x0c, 0xd1, 0xbd, 0x65, 0xaa, 0x1f, 0x49, - 0xaa, 0x87, 0x7b, 0xfb, 0xa3, 0xa9, 0x8c, 0x37, 0xe5, 0xab, 0x8c, 0x97, 0x42, 0xcd, 0x50, 0x9f, - 0x68, 0xa0, 0x25, 0x8b, 0x32, 0xba, 0xb1, 0x3d, 0xc2, 0xaa, 0x3b, 0x56, 0x17, 0x0c, 0x4d, 0x58, - 0xee, 0xe3, 0xfa, 0x6f, 0x50, 0xfc, 0xba, 0xa3, 0xfe, 0xb3, 0x71, 0xd8, 0x7b, 0xf8, 0xa1, 0x2a, - 0xc5, 0xac, 0xfc, 0xf3, 0xc3, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x9a, 0x29, 0x88, 0x91, - 0x19, 0x00, 0x00, + // 1959 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x5b, 0x6f, 0x1b, 0xc7, + 0x15, 0x06, 0x25, 0x4b, 0xa2, 0x0e, 0x25, 0x4b, 0x1c, 0x31, 0xd2, 0x8a, 0xba, 0x98, 0x59, 0x5b, + 0x8e, 0x2c, 0xa5, 0xa2, 0xa1, 0x26, 0xbd, 0x38, 0x4d, 0x01, 0x59, 0xb2, 0x5d, 0xa1, 0xb6, 0x23, + 0x50, 0x4e, 0x83, 0x5e, 0x90, 0xc5, 0x6a, 0x77, 0x48, 0x4d, 0xcc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03, 0x48, 0x04, 0x8f, 0x5e, 0xe3, 0xd0, 0x9a, 0x69, 0x94, 0xf6, 0x17, 0x15, 0x44, 0x4e, 0x7c, + 0x25, 0x46, 0xd1, 0x4f, 0x01, 0xf2, 0x90, 0xac, 0xd9, 0x46, 0x69, 0xbf, 0x72, 0x5c, 0x3f, 0x52, + 0x31, 0x1d, 0xa5, 0x31, 0x1d, 0x3d, 0x15, 0x90, 0x17, 0x2e, 0x7b, 0xdd, 0x5a, 0x6c, 0xa7, 0x8f, + 0x68, 0x13, 0xe6, 0x3e, 0x4f, 0x30, 0xed, 0x5b, 0xb7, 0x72, 0x66, 0x35, 0x62, 0x07, 0x50, 0x1b, + 0x0c, 0x99, 0xc5, 0x51, 0xc8, 0x30, 0xfa, 0x01, 0x94, 0xd3, 0x32, 0x58, 0xa5, 0xc6, 0xec, 0x7e, + 0xe5, 0xb8, 0x7a, 0x94, 0xd6, 0xe1, 0x48, 0xa3, 0x5b, 0x19, 0x04, 0xdd, 0x87, 0x95, 0x10, 0xdf, + 0x70, 0x67, 0x78, 0x15, 0xad, 0x65, 0x31, 0x7c, 0x91, 0x2e, 0xc2, 0xbe, 0x0b, 0xd5, 0x67, 0x38, + 0xf5, 0x96, 0xe6, 0xe7, 0x36, 0xcc, 0x10, 0x5f, 0x26, 0x66, 0xb1, 0x35, 0x43, 0x7c, 0xfb, 0x12, + 0x6a, 0xa7, 0x14, 0xbb, 0x1c, 0x4f, 0xc6, 0xa1, 0x43, 0x58, 0xd0, 0x01, 0x48, 0x67, 0x23, 0x43, + 0x4c, 0x11, 0xf6, 0x1f, 0x4a, 0x50, 0xfb, 0x38, 0xf6, 0x8b, 0xac, 0x06, 0x4b, 0x69, 0x1a, 0x0b, + 0xfa, 0x00, 0x2a, 0x89, 0x24, 0x51, 0x55, 0x98, 0x99, 0x5a, 0x05, 0x50, 0x70, 0xf1, 0x6c, 0xdf, + 0x87, 0xda, 0x19, 0xee, 0xe2, 0x69, 0xeb, 0xb2, 0xff, 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, 0xbe, 0x35, 0xb7, 0x91, 0x11, 0xba, 0xb7, + 0xe8, 0xea, 0x47, 0xd2, 0xd5, 0xc3, 0x83, 0xc3, 0xf1, 0xae, 0x8c, 0x5f, 0xca, 0x97, 0x99, 0x5f, + 0x0a, 0x15, 0x43, 0x7d, 0xa2, 0xa1, 0x96, 0x1c, 0x94, 0xd1, 0xf5, 0x9d, 0x31, 0x56, 0xdd, 0xb1, + 0xba, 0x60, 0x68, 0xca, 0x72, 0x1f, 0xd7, 0x7e, 0x83, 0xe2, 0xd7, 0x1d, 0xf5, 0x4f, 0x8e, 0x66, + 0xef, 0xe1, 0x07, 0xaa, 0x14, 0xf3, 0xf2, 0xcf, 0x0f, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x83, + 0xbc, 0xbd, 0x54, 0x9c, 0x19, 0x00, 0x00, } diff --git a/pkg/proto/v0/accounts.proto b/pkg/proto/v0/accounts.proto index a9bfb28da6..02fb9c5b91 100644 --- a/pkg/proto/v0/accounts.proto +++ b/pkg/proto/v0/accounts.proto @@ -242,8 +242,9 @@ message Account { // The username // posixaccount MUST uid - string username = 7; + string preferred_name = 7; + // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users // used for exposing the user using ldap // posixaccount MUST uidnumber int64 uid_number = 8; diff --git a/pkg/service/v0/service.go b/pkg/service/v0/service.go index b61b71046e..fcedb024eb 100644 --- a/pkg/service/v0/service.go +++ b/pkg/service/v0/service.go @@ -4,14 +4,17 @@ import ( "context" "encoding/json" "errors" + "fmt" "io/ioutil" "os" "path/filepath" "regexp" + "strings" "github.com/CiscoM31/godata" "github.com/blevesearch/bleve" "github.com/blevesearch/bleve/search/query" + "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" mclient "github.com/micro/go-micro/v2/client" "github.com/owncloud/ocis-accounts/pkg/config" @@ -20,6 +23,13 @@ import ( olog "github.com/owncloud/ocis-pkg/v2/log" settings "github.com/owncloud/ocis-settings/pkg/proto/v0" "github.com/rs/zerolog/log" + "github.com/tredoe/osutil/user/crypt" + + // register crypt functions + _ "github.com/tredoe/osutil/user/crypt/apr1_crypt" + _ "github.com/tredoe/osutil/user/crypt/md5_crypt" + _ "github.com/tredoe/osutil/user/crypt/sha256_crypt" + _ "github.com/tredoe/osutil/user/crypt/sha512_crypt" ) // New returns a new instance of Service @@ -80,17 +90,30 @@ type Service struct { index bleve.Index } -// the auth request is currently hardcoded and has to macth this regex -// userName eq \"teddy\" and password eq \"F&1!b90t111!\" -var authQuery = regexp.MustCompile(`^username eq '(.*)' and password eq '(.*)'$`) // TODO how is ' escaped in the password? +// an auth request is currently hardcoded and has to match this regex +// login eq \"teddy\" and password eq \"F&1!b90t111!\" +var authQuery = regexp.MustCompile(`^login eq '(.*)' and password eq '(.*)'$`) // TODO how is ' escaped in the password? // ListAccounts implements the AccountsServiceHandler interface // the query contains account properties // TODO id vs onpremiseimmutableid func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest, res *proto.ListAccountsResponse) (err error) { + var password string + var query query.Query + // check if this looks like an auth request + match := authQuery.FindStringSubmatch(in.Query) + if len(match) == 3 { + in.Query = fmt.Sprintf("preferred_name eq '%s'", match[1]) // todo fetch email? make query configurable + password = match[2] + if password == "" { + + return fmt.Errorf("password must not be empty") + } + } + if in.Query != "" { // parse the query like an odata filter var q *godata.GoDataFilterQuery @@ -112,7 +135,8 @@ func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest log.Debug().Interface("query", query).Msg("using query") searchRequest := bleve.NewSearchRequest(query) - searchResult, err := s.index.Search(searchRequest) + var searchResult *bleve.SearchResult + searchResult, err = s.index.Search(searchRequest) log.Debug().Interface("result", searchResult).Msg("result") res.Accounts = make([]*proto.Account, 0) @@ -120,7 +144,8 @@ func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest for _, hit := range searchResult.Hits { path := filepath.Join(s.Config.Server.AccountsDataPath, "accounts", hit.ID) - data, err := ioutil.ReadFile(path) + var data []byte + data, err = ioutil.ReadFile(path) if err != nil { log.Error().Err(err).Str("path", path).Msg("could not read account") continue @@ -132,20 +157,106 @@ func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest continue } log.Debug().Interface("account", a).Msg("found account") + + if password != "" { + if a.PasswordProfile == nil { + log.Debug().Interface("account", a).Msg("no password profile") + return fmt.Errorf("invalid password") + } + if !s.passwordIsValid(a.PasswordProfile.Password, password) { + return fmt.Errorf("invalid password") + } + } + res.Accounts = append(res.Accounts, &a) } return nil } +func (s Service) passwordIsValid(hash string, pwd string) (ok bool) { + defer func() { + if r := recover(); r != nil { + log.Error().Err(fmt.Errorf("%s", r)).Str("hash", hash).Msg("password lib panicked") + } + }() + + c := crypt.NewFromHash(hash) + return c.Verify(hash, []byte(pwd)) == nil +} + +func cleanupID(id string) (string, error) { + id = filepath.Clean(id) + if id == "." || strings.Contains(id, "/") { + return "", errors.New("bad request") + } + return id, nil +} + // GetAccount implements the AccountsServiceHandler interface func (s Service) GetAccount(c context.Context, req *proto.GetAccountRequest, res *proto.Account) (err error) { - return errors.New("not implemented") + var id string + if id, err = cleanupID(req.Id); err != nil { + return + } + path := filepath.Join(s.Config.Server.AccountsDataPath, "accounts", id) + + var data []byte + data, err = ioutil.ReadFile(path) + if err != nil { + log.Error().Err(err).Str("path", path).Msg("could not read account") + // TODO we need error handling ... eg Not Found + return fmt.Errorf("account not found") + } + err = json.Unmarshal(data, res) + if err != nil { + log.Error().Err(err).Str("path", path).Msg("could not unmarshal account") + return fmt.Errorf("internal server error") + } + + log.Debug().Interface("account", res).Msg("found account") + return } // CreateAccount implements the AccountsServiceHandler interface func (s Service) CreateAccount(c context.Context, req *proto.CreateAccountRequest, res *proto.Account) (err error) { - return errors.New("not implemented") + var id string + if req.Id == "" { + req.Id = uuid.Must(uuid.NewV4()).String() + } + // we are always ignoring the id in the account here ... hmm just do away with the extra id property? + req.Account.Id = req.Id + + if id, err = cleanupID(req.Id); err != nil { + return + } + path := filepath.Join(s.Config.Server.AccountsDataPath, "accounts", id) + + if req.Account.PasswordProfile != nil && req.Account.PasswordProfile.Password != "" { + // encrypt password + c := crypt.New(crypt.SHA512) + if req.Account.PasswordProfile.Password, err = c.Generate([]byte(req.Account.PasswordProfile.Password), nil); err != nil { + req.Account.PasswordProfile.Password = "***REMOVED***" + log.Error().Err(err).Str("id", id).Interface("account", req.Account).Msg("could not hash password") + return + } + } + + var bytes []byte + bytes, err = json.Marshal(req.GetAccount) + if err = ioutil.WriteFile(path, bytes, 0600); err != nil { + req.Account.PasswordProfile.Password = "***REMOVED***" + log.Error().Err(err).Str("id", id).Str("path", path).Interface("account", req.Account).Msg("could not persist new account") + return + } + + if err = s.index.Index(id, req.Account); err != nil { + req.Account.PasswordProfile.Password = "***REMOVED***" + log.Error().Err(err).Str("id", id).Str("path", path).Interface("account", req.Account).Msg("could not index new account") + return + } + + return } // UpdateAccount implements the AccountsServiceHandler interface @@ -155,7 +266,22 @@ func (s Service) UpdateAccount(c context.Context, req *proto.UpdateAccountReques // DeleteAccount implements the AccountsServiceHandler interface func (s Service) DeleteAccount(c context.Context, req *proto.DeleteAccountRequest, res *empty.Empty) (err error) { - return errors.New("not implemented") + var id string + if id, err = cleanupID(req.Id); err != nil { + return + } + path := filepath.Join(s.Config.Server.AccountsDataPath, "accounts", id) + + if err = os.Remove(path); err != nil { + log.Error().Err(err).Str("id", id).Str("path", path).Msg("could not remove account") + return + } + + if err = s.index.Delete(id); err != nil { + log.Error().Err(err).Str("id", id).Str("path", path).Msg("could not remove account from index") + return + } + return os.Remove(path) } // ListGroups implements the AccountsServiceHandler interface