@@ -470,7 +470,7 @@ parameters. Using: https://.../rest/data/issue you can search using:
470470 * - ``status=open``
471471 - Link
472472 - find any issue where the name of the status is open.
473- Note this is not a string match so using nosy =ope will fail.
473+ Note this is not a string match so using status =ope will fail.
474474 * - ``nosy=1``
475475 - MultiLink
476476 - find any issue where the multilink nosy includes the id 1.
@@ -690,12 +690,10 @@ inclusion of ``@verbose=2``. Without verbose you would see::
690690 "data": {
691691 "collection": [
692692 {
693- "link":
694- "https://.../rest/data/issue/1",
693+ "link": "https://.../rest/data/issue/1",
695694 "id": "1",
696695 "status": {
697- "link":
698- "https://.../rest/data/status/1",
696+ "link": "https://.../rest/data/status/1",
699697 "id": "1"
700698 }
701699 },
@@ -1149,8 +1147,7 @@ example::
11491147 ]
11501148 },
11511149 "type": "issue",
1152- "link":
1153- "https://example.com/demo/rest/data/issue/23",
1150+ "link": "https://example.com/demo/rest/data/issue/23",
11541151 "id": "23"
11551152 }
11561153 }
@@ -1313,7 +1310,8 @@ rest/data/msg/11/content to obtain::
13131310 "id": "11",
13141311 "type": "<class 'str'>",
13151312 "link": "https://.../demo/rest/data/msg/11/content",
1316- "data": "of has to who pleasure. or of account give because the reprehenderit\neu to quisquam velit, passage, was or...",
1313+ "data": "of has to who pleasure. or of account give because the
1314+ reprehenderit\neu to quisquam velit, passage, was or...",
13171315 "@etag": "\"584f82231079e349031bbb853747df1c\""
13181316 }
13191317 }
@@ -1456,7 +1454,8 @@ allows the request to pass the CSRF protection mechanism. You may need
14561454to add an Origin header if this check is enabled in your tracker's
14571455config.ini (look for csrf_enforce_header_origin). (Note the Origin
14581456header check may have to be disabled if an application is making a
1459- CORS request to the Roundup server.)
1457+ CORS request to the Roundup server. If you have this issue, please
1458+ contact the Roundup team using the mailing lists as this is a bug.)
14601459
14611460A similar curl based retire example is to use::
14621461
@@ -1850,7 +1849,7 @@ There are 5 steps to set this up:
18501849 jwt module you will see the error ``Support for jwt disabled.``
185118502. create a new role that allows Create access to timelog and edit/view
18521851 access to an issues' ``times`` property.
1853- 3. add support for issuing (and validating) jwts to the rest interface.
1852+ 3. add support for issuing (and validating) JWTs to the rest interface.
18541853 This uses the `Adding new rest endpoints`_ mechanism.
185518544. configure roundup's config.ini [web] jwt_secret with at least 32
18561855 random characters of data. (You will get a message
@@ -2024,43 +2023,43 @@ only been tested with python3)::
20242023 return 200, result
20252024
20262025**Note this is sample code. Use at your own risk.** It breaks a few
2027- rules about jwts (e.g. it allows you to make unlimited lifetime
2028- jwts ). If you subscribe to the concept of jwt refresh tokens, this code
2029- will have to be changed as it will only generate jwts with
2026+ rules about JWTs (e.g. it allows you to make unlimited lifetime
2027+ JWTs ). If you subscribe to the concept of JWT refresh tokens, this code
2028+ will have to be changed as it will only generate JWTs with
20302029username/password authentication.
20312030
2032- Currently use of jwts an experiment. If this appeals to you consider
2031+ Currently use of JWTs an experiment. If this appeals to you consider
20332032providing patches to existing code to:
20342033
2035- 1. record all jwts created by a user
2036- 2. using the record to allow jwts to be revoked and ignored by the
2034+ 1. record all JWTs created by a user
2035+ 2. using the record to allow JWTs to be revoked and ignored by the
20372036 roundup core
2038- 3. provide a UI page for managing/revoking jwts
2039- 4. provide a rest api for revoking jwts
2037+ 3. provide a UI page for managing/revoking JWTs
2038+ 4. provide a rest api for revoking JWTs
20402039
20412040These end points can be used like::
20422041
20432042 curl -u demo -s -X POST -H "Referer: https://.../demo/" \
20442043 -H "X-requested-with: rest" \
20452044 -H "Content-Type: application/json" \
20462045 --data '{"lifetime": "3600", "roles": [ "user:timelog" ] }' \
2047- https://.../demo/rest/jwt /issue
2046+ https://.../demo/rest/JWT /issue
20482047
20492048(note roles is a json array/list of strings not a string) to get::
20502049
20512050 {
20522051 "data": {
2053- "jwt ": "eyJ0eXAiOiJK......XxMDb-Q3oCnMpyhxPXMAk"
2052+ "JWT ": "eyJ0eXAiOiJK......XxMDb-Q3oCnMpyhxPXMAk"
20542053 }
20552054 }
20562055
2057- The jwt is shortened in the example since it's large. You can validate
2058- a jwt to see if it's still valid using::
2056+ The JWT is shortened in the example since it's large. You can validate
2057+ a JWT to see if it's still valid using::
20592058
20602059
20612060 curl -s -H "Referer: https://.../demo/" \
20622061 -H "X-requested-with: rest" \
2063- https://.../demo/rest/jwt /validate?jwt =eyJ0eXAiOiJK...XxMDb-Q3oCnMpyhxPXMAk
2062+ https://.../demo/rest/JWT /validate?JWT =eyJ0eXAiOiJK...XxMDb-Q3oCnMpyhxPXMAk
20642063
20652064(note no login is required) which returns::
20662065
@@ -2077,12 +2076,18 @@ a jwt to see if it's still valid using::
20772076 }
20782077 }
20792078
2079+
2080+ There is an issue for `thoughts on JWT credentials`_ that you can view
2081+ for ideas or add your own.
2082+
2083+ .. _thoughts on JWT credentials: https://issues.roundup-tracker.org/issue2551064
2084+
20802085Final steps
20812086^^^^^^^^^^^
20822087
20832088See the `upgrading directions`_ on how to use the ``updateconfig``
20842089command to generate an updated copy of config.ini using
2085- roundup-admin. Then set the ``jwt_secret `` to at least 32 characters
2090+ roundup-admin. Then set the ``JWT_secret `` to at least 32 characters
20862091(more is better up to 512 bits).
20872092
20882093Writing an auditor that uses "db.user.get_roles" to see if the user
@@ -2094,7 +2099,7 @@ https://issues.roundup-tracker.org/.)
20942099
20952100Lastly you can create a JWT using the end point above and make a rest
20962101call to create a new timelog entry and another call to update the
2097- issues times property. If you have other ideas on how jwts can be
2102+ issues times property. If you have other ideas on how JWTs can be
20982103used, please share on the roundup mailing lists. See:
20992104https://sourceforge.net/p/roundup/mailman/ for directions on
21002105subscribing and for archives of the lists.
0 commit comments