Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker swagger definition v1.37 incorrect description of field Data in Create config mode #37671

Open
dasm0012 opened this issue Aug 20, 2018 · 0 comments

Comments

@dasm0012
Copy link

Description

Docker swagger definition v1.37 specifies to use Base64-url-safe-encoded (RFC 4648) config data for the 'Data'-field of the input model for entry POST /configs/create.

However doing so will result in an error; {"message":"illegal base64 data at input byte XXXXX"}

Workaround; Use the standard base64 table1 (as defined in rfc4648#section-4)

Steps to reproduce the issue:

Data before base-64 encoding
<slave_config><max_log_lines>10000</max_log_lines><max_log_timeout_minutes>600</max_log_timeout_minutes><object_timeout_minutes>60</object_timeout_minutes>PDISESSIONIDcf18e2f3531348f7aa6da4a81df172730.0.0.08080TODO-CHANGETOUTILTODO-CHANGETOUTIL</slave_config>

Incorrectly Rejected Base64-url-safe-encoding
{
"Name": "dcPDISESSIONIDcf18e2f3531348f7aa6da4a81df17273",
"Data": "PHNsYXZlX2NvbmZpZz48bWF4X2xvZ19saW5lcz4xMDAwMDwvbWF4X2xvZ19saW5lcz48bWF4X2xvZ190aW1lb3V0X21pbnV0ZXM-NjAwPC9tYXhfbG9nX3RpbWVvdXRfbWludXRlcz48b2JqZWN0X3RpbWVvdXRfbWludXRlcz42MDwvb2JqZWN0X3RpbWVvdXRfbWludXRlcz48c2xhdmVzZXJ2ZXI-PG5hbWU-UERJU0VTU0lPTklEY2YxOGUyZjM1MzEzNDhmN2FhNmRhNGE4MWRmMTcyNzM8L25hbWU-PGhvc3RuYW1lPjAuMC4wLjA8L2hvc3RuYW1lPjxwb3J0PjgwODA8L3BvcnQ-PHVzZXJuYW1lPlRPRE8tQ0hBTkdFVE9VVElMPC91c2VybmFtZT48cGFzc3dvcmQ-VE9ETy1DSEFOR0VUT1VUSUw8L3Bhc3N3b3JkPjwvc2xhdmVzZXJ2ZXI-PC9zbGF2ZV9jb25maWc-"
}

Describe the results you expected:

Either documentation specifies one should use standard base64 table1 (as defined in rfc4648#section-4)
Or have docker API server accept Base64-url-safe-encoded (RFC 4648) as the contents of the 'Data'-field of the input model for entry POST /configs/create

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants