I am able to verify Fernet tokens that contain garbage at the end, not so with UUID tokens.
For example.
UUID:
curl -H "X-Auth-Token:84db9247b27d4fe6bd0a09b7b39281e2" http://localhost:35357/v2.0/tokens/84db9247b27d4fe6bd0a09b7b39281e2
Works
curl -H "X-Auth-Token:84db9247b27d4fe6bd0a09b7b39281e2" http://localhost:35357/v2.0/tokens/84db9247b27d4fe6bd0a09b7b39281e2-GARBAGE {"error": {"message": "Could not find token: 84db9247b27d4fe6bd0a09b7b39281e2-GARBAGE", "code": 404, "title": "Not Found"}}
Fernet on the other hand happily validates it even with garbage and even inserts -GARBAGE into the ID.
curl -H "X-Auth-Token:gAAAAABVZnaEJuVPaQwW5y84w1sZt9TvxJk4Cgh8dmeISr68a7yVnl0hIpOAJ8YWluXJwym96xauaj0M737GZLzwhiF44u5JJXIjSiqQFtH3bQDrlBS-TmIAgkHcy0TsCBioof-Rzu4NbuSqkzjD5BJSRJnRqI2Sg-G-kTbRdblC5JBuyJjdMj8%3D" http://localhostt:35357/v2.0/tokens/gAAAAABVZnaEJuVPaQwW5y84w1sZt9TvxJk4Cgh8dmeISr68a7yVnl0hIpOAJ8YWluXJwym96xauaj0M737GZLzwhiF44u5JJXIjSiqQFtH3bQDrlBS-TmIAgkHcy0TsCBioof-Rzu4NbuSqkzjD5BJSRJnRqI2Sg-G-kTbRdblC5JBuyJjdMj8%3D
"token": { "audit_ids": [ "WlVgiNv2RmOGaDa_4PpGGg" ], "expires": "2015-05-28T03:59:32.000000Z", "id": "gAAAAABVZnaEJuVPaQwW5y84w1sZt9TvxJk4Cgh8dmeISr68a7yVnl0hIpOAJ8YWluXJwym96xauaj0M737GZLzwhiF44u5JJXIjSiqQFtH3bQDrlBS-TmIAgkHcy0TsCBioof-Rzu4NbuSqkzjD5BJSRJnRqI2Sg-G-kTbRdblC5JBuyJjdMj8=", "issued_at": "2015-05-28T01:59:32.000000Z", "tenant": { "description": "Cloud Infra: Admin Tenant", "enabled": true, "id": "4764ba822ecb43e582794b875751924c", "name": "admin", "parent_id": null } },
"token": { "audit_ids": [ "WlVgiNv2RmOGaDa_4PpGGg" ], "expires": "2015-05-28T03:59:32.000000Z", "id": "gAAAAABVZnaEJuVPaQwW5y84w1sZt9TvxJk4Cgh8dmeISr68a7yVnl0hIpOAJ8YWluXJwym96xauaj0M737GZLzwhiF44u5JJXIjSiqQFtH3bQDrlBS-TmIAgkHcy0TsCBioof-Rzu4NbuSqkzjD5BJSRJnRqI2Sg-G-kTbRdblC5JBuyJjdMj8=-GARBAGE", "issued_at": "2015-05-28T01:59:32.000000Z", "tenant": { "description": "Cloud Infra: Admin Tenant", "enabled": true, "id": "4764ba822ecb43e582794b875751924c", "name": "admin", "parent_id": null } },
I am able to verify Fernet tokens that contain garbage at the end, not so with UUID tokens.
For example.
UUID:
curl -H "X-Auth- Token:84db9247b 27d4fe6bd0a09b7 b39281e2" http:// localhost: 35357/v2. 0/tokens/ 84db9247b27d4fe 6bd0a09b7b39281 e2
Works
curl -H "X-Auth- Token:84db9247b 27d4fe6bd0a09b7 b39281e2" http:// localhost: 35357/v2. 0/tokens/ 84db9247b27d4fe 6bd0a09b7b39281 e2-GARBAGE 6bd0a09b7b39281 e2-GARBAGE" , "code": 404, "title": "Not Found"}}
{"error": {"message": "Could not find token: 84db9247b27d4fe
Fernet on the other hand happily validates it even with garbage and even inserts -GARBAGE into the ID.
curl -H "X-Auth- Token:gAAAAABVZ naEJuVPaQwW5y84 w1sZt9TvxJk4Cgh 8dmeISr68a7yVnl 0hIpOAJ8YWluXJw ym96xauaj0M737G ZLzwhiF44u5JJXI jSiqQFtH3bQDrlB S-TmIAgkHcy0TsC Bioof-Rzu4NbuSq kzjD5BJSRJnRqI2 Sg-G-kTbRdblC5J BuyJjdMj8% 3D" http:// localhostt: 35357/v2. 0/tokens/ gAAAAABVZnaEJuV PaQwW5y84w1sZt9 TvxJk4Cgh8dmeIS r68a7yVnl0hIpOA J8YWluXJwym96xa uaj0M737GZLzwhi F44u5JJXIjSiqQF tH3bQDrlBS- TmIAgkHcy0TsCBi oof-Rzu4NbuSqkz jD5BJSRJnRqI2Sg -G-kTbRdblC5JBu yJjdMj8% 3D
"token": {
"audit_ ids": [
"WlVgiNv2RmOG aDa_4PpGGg"
"expires" : "2015-05- 28T03:59: 32.000000Z" , VPaQwW5y84w1sZt 9TvxJk4Cgh8dmeI Sr68a7yVnl0hIpO AJ8YWluXJwym96x auaj0M737GZLzwh iF44u5JJXIjSiqQ FtH3bQDrlBS- TmIAgkHcy0TsCBi oof-Rzu4NbuSqkz jD5BJSRJnRqI2Sg -G-kTbRdblC5JBu yJjdMj8= ",
"issued_ at": "2015-05- 28T01:59: 32.000000Z" ,
"tenant" : {
"description" : "Cloud Infra: Admin Tenant",
"enabled" : true,
"id": "4764ba822ecb43 e582794b8757519 24c",
"name" : "admin",
"parent_ id": null
],
"id": "gAAAAABVZnaEJu
}
},
"token": {
"audit_ ids": [
"WlVgiNv2RmOG aDa_4PpGGg"
"expires" : "2015-05- 28T03:59: 32.000000Z" , VPaQwW5y84w1sZt 9TvxJk4Cgh8dmeI Sr68a7yVnl0hIpO AJ8YWluXJwym96x auaj0M737GZLzwh iF44u5JJXIjSiqQ FtH3bQDrlBS- TmIAgkHcy0TsCBi oof-Rzu4NbuSqkz jD5BJSRJnRqI2Sg -G-kTbRdblC5JBu yJjdMj8= -GARBAGE" ,
"issued_ at": "2015-05- 28T01:59: 32.000000Z" ,
"tenant" : {
"description" : "Cloud Infra: Admin Tenant",
"enabled" : true,
"id": "4764ba822ecb43 e582794b8757519 24c",
"name" : "admin",
"parent_ id": null
],
"id": "gAAAAABVZnaEJu
}
},