MAAS version API call should not require authentication
Bug #1583715 reported by
Christian Reis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Gavin Panella | ||
1.9 |
Fix Released
|
Undecided
|
Gavin Panella |
Bug Description
Bug 1393952 added the much appreciated API to retrieve the MAAS version. Unfortunately, it's only available to logged in users!
<kiko> allenap, does a GET /api/2.0/version/ require authentication?
<allenap> kiko: It shouldn't do, but I'll check.
<allenap> kiko: Wow, it is restricted only to users.
This probably should be fixed for 2.0 and the 1.9 series to ensure we can actually tell the two apart automatically.
Related branches
lp:~allenap/maas/version-without-auth--bug-1583715
- Blake Rouse (community): Approve
-
Diff: 192 lines (+108/-4)4 files modifiedsrc/maasserver/api/support.py (+26/-0)
src/maasserver/api/tests/test_support.py (+67/-1)
src/maasserver/api/tests/test_version.py (+14/-2)
src/maasserver/urls_api.py (+1/-1)
lp:~allenap/maas/api-testing-for-multiple-users-and-clients
- Gavin Panella (community): Approve
-
Diff: 4703 lines (+772/-673)58 files modifiedsrc/maasserver/api/nodes.py (+1/-1)
src/maasserver/api/tests/test_api.py (+22/-36)
src/maasserver/api/tests/test_bcache.py (+2/-2)
src/maasserver/api/tests/test_bcache_cacheset.py (+4/-4)
src/maasserver/api/tests/test_blockdevice.py (+18/-18)
src/maasserver/api/tests/test_boot_resources.py (+4/-5)
src/maasserver/api/tests/test_boot_source_selections.py (+2/-2)
src/maasserver/api/tests/test_boot_sources.py (+2/-2)
src/maasserver/api/tests/test_commissioning.py (+5/-12)
src/maasserver/api/tests/test_describe.py (+5/-4)
src/maasserver/api/tests/test_devices.py (+15/-15)
src/maasserver/api/tests/test_dhcpsnippets.py (+2/-2)
src/maasserver/api/tests/test_dnsresourcerecords.py (+2/-2)
src/maasserver/api/tests/test_dnsresources.py (+2/-2)
src/maasserver/api/tests/test_doc.py (+17/-14)
src/maasserver/api/tests/test_domains.py (+2/-2)
src/maasserver/api/tests/test_enlistment.py (+10/-41)
src/maasserver/api/tests/test_events.py (+3/-3)
src/maasserver/api/tests/test_fabrics.py (+2/-2)
src/maasserver/api/tests/test_fannetworks.py (+2/-2)
src/maasserver/api/tests/test_filestorage.py (+15/-15)
src/maasserver/api/tests/test_interfaces.py (+15/-15)
src/maasserver/api/tests/test_ipaddresses.py (+10/-10)
src/maasserver/api/tests/test_ipranges.py (+7/-7)
src/maasserver/api/tests/test_licensekey.py (+2/-2)
src/maasserver/api/tests/test_maas.py (+1/-1)
src/maasserver/api/tests/test_machine.py (+107/-105)
src/maasserver/api/tests/test_machines.py (+37/-45)
src/maasserver/api/tests/test_network.py (+8/-8)
src/maasserver/api/tests/test_networks.py (+1/-1)
src/maasserver/api/tests/test_node.py (+35/-28)
src/maasserver/api/tests/test_nodes.py (+6/-7)
src/maasserver/api/tests/test_not_found.py (+7/-7)
src/maasserver/api/tests/test_partitions.py (+10/-10)
src/maasserver/api/tests/test_rackcontroller.py (+5/-5)
src/maasserver/api/tests/test_raid.py (+2/-2)
src/maasserver/api/tests/test_regioncontroller.py (+2/-2)
src/maasserver/api/tests/test_spaces.py (+2/-2)
src/maasserver/api/tests/test_ssl_key.py (+11/-11)
src/maasserver/api/tests/test_subnets.py (+8/-8)
src/maasserver/api/tests/test_support.py (+4/-3)
src/maasserver/api/tests/test_tag.py (+4/-4)
src/maasserver/api/tests/test_user.py (+6/-6)
src/maasserver/api/tests/test_utils.py (+21/-15)
src/maasserver/api/tests/test_version.py (+3/-11)
src/maasserver/api/tests/test_vlans.py (+2/-2)
src/maasserver/api/tests/test_volume_groups.py (+2/-2)
src/maasserver/api/tests/test_zone.py (+1/-1)
src/maasserver/api/tests/test_zones.py (+1/-1)
src/maasserver/middleware.py (+4/-1)
src/maasserver/testing/api.py (+179/-79)
src/maasserver/testing/oauthclient.py (+0/-70)
src/maasserver/testing/testcase.py (+5/-0)
src/maasserver/testing/testclient.py (+109/-3)
src/maasserver/urls_api.py (+2/-2)
src/maastesting/testcase.py (+9/-4)
src/metadataserver/tests/test_api.py (+4/-4)
src/metadataserver/tests/test_api_status.py (+3/-3)
lp:~allenap/maas/version-without-auth--bug-1583715--1.9
- Gavin Panella (community): Approve
-
Diff: 206 lines (+110/-5)4 files modifiedsrc/maasserver/api/support.py (+26/-0)
src/maasserver/api/tests/test_support.py (+67/-1)
src/maasserver/api/tests/test_version.py (+15/-3)
src/maasserver/urls_api.py (+2/-1)
Changed in maas: | |
status: | New → In Progress |
assignee: | nobody → Gavin Panella (allenap) |
Changed in maas: | |
importance: | Undecided → High |
milestone: | none → 2.0.0 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Noting that GET /api/version also appears to be requiring authentication, which we should probably fix in one fell swoop; here's a test run by Mike P.: https:/ /paste. ubuntu. com/16664676/