fog / fog-openstack

Fog for OpenStack Platform
MIT License
68 stars 130 forks source link

Delete newlines in base64 encoding #528

Closed ogrand closed 1 year ago

ogrand commented 1 year ago

Bosh Openstack cpi uses a POST request for instance creation, with body content user_data base64 encoded row containing newlines \n every 60 characters:

body: {
  "server": {
    "flavorRef": "s3.small.1",
    "name": "vm-d35f15af-9840-44be-8d95-a2b1e1ad5358",
    "imageRef": "97727138-8334-4188-9b1e-4x558599d99b",
    "user_data": "eyJzZXJ2ZXIiOnsibmFtZSI6InZtLWQzNWYxNWFmLTk4NDAtNDRiZS04ZDk1\nLWEyYjFlMWFkNTM1OCJ9LCJuZXR3b3JrcyI6eyJ0Zi1uZXQtY29hYi1kZXBs\ncy1pb

Recent upgrade (openstack 22.3) is less permissive for base64 decoding and refuses newlines \n inside base64 encoded value.

Reference: https://github.com/cloudfoundry/bosh-openstack-cpi-release/issues/255

rkoster commented 1 year ago

@ares could we get a review on this PR? it is currently blocking us here: https://github.com/cloudfoundry/bosh-openstack-cpi-release/issues/255

ramonskie commented 1 year ago

@geemus i noticed you have the latest activity regarding the fog modules do you if there will be any activity related to the fog-openstack repo. or is considerd dead?

geemus commented 1 year ago

@ramonskie - good question. I haven't been actively watching all the fog repos anymore since I don't use them and don't have access to test setups for most of them any more. That being said, I still will come in and merge or help out on things that fall through the cracks. Some of the folks that were more active seem to have fallen away, so hopefully we can find some new folks to help.