Merge lp://staging/~hazmat/pyjuju/security-policy-rules-redux into lp://staging/pyjuju
Status: | Work in progress |
---|---|
Proposed branch: | lp://staging/~hazmat/pyjuju/security-policy-rules-redux |
Merge into: | lp://staging/pyjuju |
Prerequisite: | lp://staging/~hazmat/pyjuju/security-policy-with-topology |
Diff against target: |
1217 lines (+586/-208) (has conflicts) 14 files modified
juju/providers/local/__init__.py (+0/-1) juju/state/initialize.py (+2/-2) juju/state/security.py (+17/-27) juju/state/securityrules.py (+192/-0) juju/state/tests/common.py (+29/-39) juju/state/tests/test_agent.py (+0/-11) juju/state/tests/test_auth.py (+3/-3) juju/state/tests/test_base.py (+7/-7) juju/state/tests/test_environment.py (+0/-4) juju/state/tests/test_firewall.py (+1/-1) juju/state/tests/test_initialize.py (+14/-3) juju/state/tests/test_security.py (+38/-108) juju/state/tests/test_securityrules.py (+223/-0) juju/state/tests/test_service.py (+60/-2) Text conflict in juju/state/service.py Text conflict in juju/state/tests/common.py Text conflict in juju/state/tests/test_initialize.py Text conflict in juju/state/tests/test_service.py |
To merge this branch: | bzr merge lp://staging/~hazmat/pyjuju/security-policy-rules-redux |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gustavo Niemeyer | Needs Fixing | ||
Review via email: mp+70502@code.staging.launchpad.net |
This proposal supersedes a proposal from 2011-08-04.
Description of the change
Redone with updated api and some simplifications.
Security ACL generator rules to match nodes based on path. The meat of the security ACL policy is embodied here, and this will likely some tweaking in the future.
Thou shall not forget pre-requisite branches lp:~hazmat/ensemble/security-policy-with-topology
Unmerged revisions
- 338. By Kapil Thangavelu
-
merge pipeline states-
with-principles - 337. By Kapil Thangavelu
-
Merged security-
policy- with-topology into security- policy- rules-redux. - 336. By Kapil Thangavelu
-
merge trunk
- 335. By Kapil Thangavelu
-
merge trunk
- 334. By Kapil Thangavelu
-
Merged security-
policy- with-topology into security- policy- rules-redux. - 333. By Kapil Thangavelu
-
update tests in aftermath of removing service state security group accessor.
- 332. By Kapil Thangavelu
-
resolve conflict from states-
with-principals - 331. By Kapil Thangavelu
-
yank security group accessor from service state
- 330. By Kapil Thangavelu
-
resolve conflict from security-
policy- with-topology merge - 329. By Kapil Thangavelu
-
Merged security-
policy- with-topology into security- policy- rules-redux.
This is looking very good overall. Thanks!
A few comments:
[1]
+ machine_token = yield policy. get_token( machine_ id) get_token( "ensemble- provider" ) machine_ token, read=True, write=True, create=True), provider_ token, read=True, write=True)])
+ provider_token = yield policy.
+ returnValue([
+ make_ace(
+ make_ace(
This logic looks very nice.
As a minor from the previous review which still wasn't sorted, agent" and "ensemble-provider" are different things,
"provisioning-
I believe the above refers to the former, not to the latter.
[2]
+ for service_id, service_data in services.items(): data["service_ id"] = service_id data["token" ] = yield policy. get_token( service_ id) append( service_ data)
+ service_data = dict(service_data)
+ service_
+ service_
+ results.
Why is this using an arbitrary blob of data rather than a typed
value with proper fields? I think we've learned our lesson with the
machine_data.
[3]
+ matched_service = [data for data in service_data \ service] .pop() matched_ service[ "token" ], read=True, create=True), related_ service[ "token" ], read=True)])
+ if data["role"] == container].pop()
+ related_service = [data for data in service_data \
+ if data != matched_
+ returnValue(
+ [make_ace(
+ make_ace(
This was raised in the previous review for this branch as well: why
is the node a "container" rather than an individual node under the
relation-id node? Can't we have multiple nodes within those
containers?
[4]
+ # Unit agent can modify tweak any unitother unit settings.
Comment is a bit corrupted.
[5]
+ # Created by the unit agent, read by the provisioning agent.
Might be good to comment here that in the future it will be moved to
the machine agent.
[6]
+ elif path == "/topology": [make_ace( "anyone" , "world", read=True)])
+ # Only the admin cli can write to this.
+ returnValue(
Also part of the original review, IIRC. It feels bad to be exposing
this to _anyone_. We don't have to sort that out right now, but at
least a comment with a recommended future solution would be nice.
[7]
+ elif path == "/auth-tokens": [make_ace( "anyone" , "world", read=True, write=True)])
+ # Any connection that creates another user needs to modify this
+ returnValue(
_Anyone_ can write to the auth tokens!?