Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(177)

Issue 7299066: state/api: enable password checking

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by rog
Modified:
11 years, 2 months ago
Reviewers:
dimitern, mp+147223, fwereade, TheMue
Visibility:
Public.

Description

state/api: enable password checking https://code.launchpad.net/~rogpeppe/juju-core/197-api-passwords/+merge/147223 Requires: https://code.launchpad.net/~rogpeppe/juju-core/176-rpc-spike/+merge/138089 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state/api: enable password checking #

Patch Set 3 : state/api: enable password checking #

Patch Set 4 : state/api: enable password checking #

Total comments: 4

Patch Set 5 : state/api: enable password checking #

Total comments: 42

Patch Set 6 : state/api: enable password checking #

Patch Set 7 : state/api: enable password checking #

Patch Set 8 : state/api: enable password checking #

Patch Set 9 : state/api: enable password checking #

Patch Set 10 : state/api: enable password checking #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1039 lines, -104 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/bootstrap.go View 1 chunk +9 lines, -7 lines 0 comments Download
M environs/dummy/environs.go View 1 2 3 4 5 3 chunks +10 lines, -6 lines 0 comments Download
M environs/jujutest/livetests.go View 1 2 3 4 5 6 1 chunk +3 lines, -5 lines 0 comments Download
M juju/api.go View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M state/api/api_test.go View 1 2 3 4 5 6 2 chunks +538 lines, -55 lines 0 comments Download
M state/api/apiclient.go View 1 2 3 4 5 6 7 8 4 chunks +129 lines, -0 lines 0 comments Download
M state/api/apiserver.go View 1 2 3 4 5 6 7 8 9 1 chunk +329 lines, -22 lines 0 comments Download
M state/api/client.go View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -7 lines 0 comments Download
M state/api/server.go View 1 chunk +1 line, -1 line 0 comments Download
M state/open.go View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9
rog
Please take a look. https://codereview.appspot.com/7299066/diff/4002/state/state.go File state/state.go (right): https://codereview.appspot.com/7299066/diff/4002/state/state.go#newcode256 state/state.go:256: EntityName() string i don't know ...
11 years, 2 months ago (2013-02-08 11:10:27 UTC) #1
TheMue
LGTM, only very small comments. https://codereview.appspot.com/7299066/diff/3007/cmd/jujud/machine_test.go File cmd/jujud/machine_test.go (right): https://codereview.appspot.com/7299066/diff/3007/cmd/jujud/machine_test.go#newcode218 cmd/jujud/machine_test.go:218: stm, conf, _ := ...
11 years, 2 months ago (2013-02-08 11:43:29 UTC) #2
dimitern
LGTM with a few comments. Nice! https://codereview.appspot.com/7299066/diff/3007/environs/dummy/environs.go File environs/dummy/environs.go (right): https://codereview.appspot.com/7299066/diff/3007/environs/dummy/environs.go#newcode463 environs/dummy/environs.go:463: // TODO(rog) use ...
11 years, 2 months ago (2013-02-08 16:29:55 UTC) #3
fwereade
LGTM assuming agreement below. https://codereview.appspot.com/7299066/diff/3007/cmd/jujud/bootstrap.go File cmd/jujud/bootstrap.go (right): https://codereview.appspot.com/7299066/diff/3007/cmd/jujud/bootstrap.go#newcode61 cmd/jujud/bootstrap.go:61: _, err = st.AddUser("admin", c.Conf.OldPassword) ...
11 years, 2 months ago (2013-02-12 13:52:20 UTC) #4
rog
Please take a look. https://codereview.appspot.com/7299066/diff/3007/cmd/jujud/bootstrap.go File cmd/jujud/bootstrap.go (right): https://codereview.appspot.com/7299066/diff/3007/cmd/jujud/bootstrap.go#newcode61 cmd/jujud/bootstrap.go:61: _, err = st.AddUser("admin", c.Conf.OldPassword) ...
11 years, 2 months ago (2013-02-12 15:02:48 UTC) #5
rog
Please take a look.
11 years, 2 months ago (2013-02-12 16:48:39 UTC) #6
rog
Please take a look.
11 years, 2 months ago (2013-02-12 16:52:44 UTC) #7
fwereade
LGTM https://codereview.appspot.com/7299066/diff/3007/state/api/apiserver.go File state/api/apiserver.go (right): https://codereview.appspot.com/7299066/diff/3007/state/api/apiserver.go#newcode117 state/api/apiserver.go:117: // Any entity is allowed to change its ...
11 years, 2 months ago (2013-02-12 16:59:30 UTC) #8
rog
11 years, 2 months ago (2013-02-12 17:31:49 UTC) #9
*** Submitted:

state/api: enable password checking

R=TheMue, dimitern, fwereade
CC=
https://codereview.appspot.com/7299066

https://codereview.appspot.com/7299066/diff/3007/state/api/apiserver.go
File state/api/apiserver.go (right):

https://codereview.appspot.com/7299066/diff/3007/state/api/apiserver.go#newco...
state/api/apiserver.go:117: // Any entity is allowed to change its own password.
On 2013/02/12 16:59:30, fwereade wrote:
> On 2013/02/12 15:02:48, rog wrote:
> > On 2013/02/12 13:52:21, fwereade wrote:
> > > So the only possible reason to get a srvUser is to change its password? If
> so,
> > > this filter seems a bit redundant.
> > 
> > it's not redundant as such, as the check needs to happen somewhere, but
> perhaps
> > i could move it into srvUser.SetPassword itself. would you prefer that?
> 
> +1, I think. Feels neater to me. Your call.

hmm, i think i'll leave it as is. i'm not sure we want one user to be able to
probe other current user names. i'll add a comment though.

https://codereview.appspot.com/7299066/diff/3007/state/api/client.go
File state/api/client.go (right):

https://codereview.appspot.com/7299066/diff/3007/state/api/client.go#newcode31
state/api/client.go:31: // If this and the password are empty, no login attempt
will be made.
On 2013/02/12 16:59:30, fwereade wrote:
> On 2013/02/12 15:02:48, rog wrote:
> > On 2013/02/08 16:29:55, dimitern wrote:
> > > And what then? Shouldn't this be a reported error?
> > 
> > this allows the client to do what any other
> > API client can do - connect without logging in.
> > (the login operation is something that happens
> > after connection).
> > 
> > this allows the tests to check that operations
> > are disallowed when the user has not logged in.
> > 
> 
> Fair enough, +1 for consistency. Maybe a comment?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b