Remove the need for project_id from API endpoints

Registered by Goutham Pacha Ravi

Manila API endpoints on a typical system look like this:

$ openstack endpoint list --service manila
+----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+
| ID | Region | Service Name | Service Type | Enabled | Interface | URL |
+----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+
| 531f4218a4434e23becdc3d4e0ab7d40 | RegionOne | manila | share | True | public | http://10.0.10.191/share/v1/$(project_id)s |
+----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+

$ openstack endpoint list --service manila --service manilav2
+----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+
| ID | Region | Service Name | Service Type | Enabled | Interface | URL |
+----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+
| 792799ff0f4640c1a9451446fc64c5f3 | RegionOne | manilav2 | sharev2 | True | public | http://10.0.10.191/share/v2/$(project_id)s |
+----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------------------+

When a user obtains a API token from keystone, they also use the keystone service catalog to list
the endpoints, whereby the project_id is substituted correctly, and the endpoint is handed to the user.

For example:

$ openstack catalog list -f yaml | grep manila -B 6
- Endpoints:
  - id: 792799ff0f4640c1a9451446fc64c5f3
    interface: public
    region: RegionOne
    region_id: RegionOne
    url: http://10.0.10.191/share/v2/5093976d7d674ebbad2706821ade1f42
  Name: manilav2
--
- Endpoints:
  - id: 531f4218a4434e23becdc3d4e0ab7d40
    interface: public
    region: RegionOne
    region_id: RegionOne
    url: http://10.0.10.191/share/v1/5093976d7d674ebbad2706821ade1f42
  Name: manila

However, manila itself doesn't care about this project_id in the URL - when using Keystone, all authentication and authorization is performed with the help of the token and having the project_id in the URL is just a legacy artifact.

Moreover, when operating at a system scope, the catalog cannot be resolved since a system scoped user doesn't have a specific project_id to interact with the system:

$ openstack catalog list --os-cloud system-admin -f yaml | grep manila -B 1
- Endpoints: []
  Name: manilav2
--
- Endpoints: []
  Name: manila

Blueprint information

Status:
Complete
Approver:
Goutham Pacha Ravi
Priority:
High
Drafter:
Goutham Pacha Ravi
Direction:
Approved
Assignee:
Goutham Pacha Ravi
Definition:
Review
Series goal:
Accepted for wallaby
Implementation:
Implemented
Milestone target:
milestone icon wallaby-rc1
Started by
Goutham Pacha Ravi
Completed by
Goutham Pacha Ravi

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.opendev.org/q/topic:%22bp%252Fremove-project-id-from-urls

Addressed by: https://review.opendev.org/773709
     Advertise v2 API routes without project_id

Addressed by: https://review.opendev.org/773986
     [devstack] create endpoint without project_id

Addressed by: https://review.opendev.org/773987
     [doc] remove project_id from api endpoints

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.