zaqar-specs/specs/rocky/remove-format-constraint-of-client-id.rst
Andreas Jaeger b5e14a0e42 Fix RST building
Specs repos now build with tox -e docs and this fails since warnings are
treated as errors. Fix issues, see below for details.

tox -e docs fails with:

1)
queens/remove-pool-group-from-zaqar.rst:402: WARNING: Inline emphasis start-string without end-string.

Fix RST syntax.

2) queens/support-md5-of-body.rst:: WARNING: document isn't included in any toctree

Include document in toctree.

3) rocky/queue-filter-support.rst:38: WARNING: Literal block expected; none found.

Fixed RST.

4) rocky/remove-format-constraint-of-client-id.rst:13: WARNING: Title overline too short.

Fixed RST.

5) rocky/remove-format-constraint-of-client-id.rst:37: ERROR: Unexpected indentation.
Fixed RST.

6) rocky/subscription-filtering-tags.rst:82: WARNING: Bullet list ends without a blank line; unexpected unindent.
Fixed RST.

Change-Id: Ide32b348d68e35f8f531c30ddae680d085553b68
2018-09-13 10:31:53 +02:00

2.4 KiB

Remove format constraint of client id

https://blueprints.launchpad.net/zaqar/+spec/remove-format-constraint-of-client-id

Since some clients use different format of client id not only uuid, so Zaqar will support this function. This also requires user to ensure the client id is immutable.

Problem description

Now Zaqar has format constraint to client id, must be UUID format. But this constraint is not very reasonable under some cases, like user want to use user id in LDAP as client id, but Zaqar doesn't allow this now.

Proposed change

  • Add Three config options:
    1. 'client_id_uuid_safe': Defines the format of client id, the value could be "strict" or "off". "strict" means the format of client id must be uuid, "off" means the restriction be removed. The default value is 'strict'.
    2. 'min_length_client_id': Defines the minimum length of client id if remove the uuid restriction. Default value is 10.
    3. 'max_length_client_id': Defines the maximum length of client id if remove the uuid restriction. Default value is 36.
  • Will change the method 'require_client_id' in wsgi/helpers.py to support validating the different format of client id.

API Impact

For WSGI: Will impact all APIs in v1.1 and v2 version.

For WebSocket: Will impact message list and message post in v2 version. And we will support others APIs in following patch.

Drawbacks

There may be a tiny performance impact when user uses very long client id since Zaqar need to store the client id in storage layer.

Alternatives

N/A

Implementation

Assignee(s)

wanghao<sxmatch1986@gmail.com>

Milestones

Rocky-3

Work Items

#* Change the Zaqar server code. #* Update API reference. #* Add release note for this feature. #* UTs for this feature.

Dependencies

N/A