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

Issue 6586070: state: add SetAdminPassword

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by rog
Modified:
11 years, 7 months ago
Reviewers:
mp+127750
Visibility:
Public.

Description

state: add SetAdminPassword We also run the testing mongo in auth mode to make sure that it's working. Next up: passwords for entities. We don't include SetAdminPassword as part of state.Initialize because otherwise all the testing stuff breaks - there are several places (for instance testing.MgoReset) which assume we can connect to the state at will without authorisation. For the above reason we provide the capability to turn off authorization (an empty password passed to SetAdminPassword); we could provide an extra call to do that if it was deemed better. https://code.launchpad.net/~rogpeppe/juju-core/102-mongo-auth-mode/+merge/127750 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: add SetAdminPassword #

Total comments: 4

Patch Set 3 : state: add SetAdminPassword #

Patch Set 4 : state: add SetAdminPassword #

Total comments: 1

Patch Set 5 : state: add SetAdminPassword #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -25 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M environs/cloudinit/cloudinit.go View 1 2 1 chunk +6 lines, -3 lines 0 comments Download
M state/confignode_test.go View 1 chunk +1 line, -0 lines 0 comments Download
M state/open.go View 1 2 3 4 4 chunks +39 lines, -21 lines 0 comments Download
M state/state.go View 1 chunk +21 lines, -0 lines 0 comments Download
M state/state_test.go View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download
M testing/mgo.go View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 6
rog
Please take a look.
11 years, 7 months ago (2012-10-03 13:05:29 UTC) #1
niemeyer
Looks sane. A couple of minors: https://codereview.appspot.com/6586070/diff/2001/state/state_test.go File state/state_test.go (right): https://codereview.appspot.com/6586070/diff/2001/state/state_test.go#newcode885 state/state_test.go:885: func (s *StateSuite) ...
11 years, 7 months ago (2012-10-03 13:22:32 UTC) #2
rog
Please take a look. https://codereview.appspot.com/6586070/diff/2001/state/state_test.go File state/state_test.go (right): https://codereview.appspot.com/6586070/diff/2001/state/state_test.go#newcode885 state/state_test.go:885: func (s *StateSuite) TestSetAdminPassword(c *C) ...
11 years, 7 months ago (2012-10-03 13:44:35 UTC) #3
niemeyer
https://codereview.appspot.com/6586070/diff/6001/state/state_test.go File state/state_test.go (right): https://codereview.appspot.com/6586070/diff/6001/state/state_test.go#newcode894 state/state_test.go:894: c.Assert(err, ErrorMatches, "unauthorized access to database") "unauthorized access" Someone ...
11 years, 7 months ago (2012-10-03 13:52:57 UTC) #4
niemeyer
LGTM with the trivial.
11 years, 7 months ago (2012-10-03 13:53:19 UTC) #5
rog
11 years, 7 months ago (2012-10-03 16:30:09 UTC) #6
*** Submitted:

state: add SetAdminPassword

We also run the testing mongo in auth mode to make sure
that it's working. Next up: passwords for entities.

We don't include SetAdminPassword as part of state.Initialize
because otherwise all the testing stuff breaks - there
are several places (for instance testing.MgoReset) which assume
we can connect to the state at will without authorisation.

For the above reason we provide the capability to turn
off authorization (an empty password passed to SetAdminPassword);
we could provide an extra call to do that if it was deemed better.

R=niemeyer
CC=
https://codereview.appspot.com/6586070
Sign in to reply to this message.

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