Jira (PDB-4528) Should we reject/warn on improperly formated configure-expiration cmds

0 views
Skip to first unread message

Zachary Kent (JIRA)

unread,
Oct 2, 2019, 1:24:05 PM10/2/19
to puppe...@googlegroups.com
Zachary Kent created an issue
 
PuppetDB / Bug PDB-4528
Should we reject/warn on improperly formated configure-expiration cmds
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2019/10/02 10:23 AM
Priority: Normal Normal
Reporter: Zachary Kent

POST http://127.0.0.1:8080/pdb/cmd/v1?command=configure_expiration&certname=haha&version=1&
Content-Type: application/json
{
 "command": "configure expiration",
 "version": 1,
 "payload": {
   "certname": "haha",
   "expire": {"facts": false},
   "producer_timestamp":  "2019-10-02T22:52:41.242"
 }
}

Submitting a request using query params with a body that's still in the old command format fails silently for "configure expiration" commands. Without the query params the request above will succeed as you would expect. Commands that use query params and have only the command wire format included in their body also succeed as expected.

Should we log a warning message when improperly formated commands have been submitted?

Looks like the check here will bail out if the payload isn't in the format we expect. Maybe we could log a warning here when this happens. Or possibly enforce validation earlier on.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Zachary Kent (JIRA)

unread,
Oct 4, 2019, 5:54:03 PM10/4/19
to puppe...@googlegroups.com

Zachary Kent (JIRA)

unread,
Oct 22, 2019, 6:32:02 PM10/22/19
to puppe...@googlegroups.com
Zachary Kent updated an issue
Change By: Zachary Kent
Fix Version/s: PDB 6.7.2
Fix Version/s: PDB 6.3.6
Reply all
Reply to author
Forward
0 new messages