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

YamlDotNet is serializing multi-line strings as double spaced #66

Closed
jefflill opened this issue May 5, 2023 · 1 comment
Closed

YamlDotNet is serializing multi-line strings as double spaced #66

jefflill opened this issue May 5, 2023 · 1 comment
Assignees
Labels
bug Something isn't working neon-sdk General neonSDK issues

Comments

@jefflill
Copy link
Contributor

jefflill commented May 5, 2023

I noticed this behavior while debugging the login refactor while looking at the the generated kubeconfig file. Here's how this impacts certificates:

sshClientKey:
  publicPUB: >
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEZ7sWfxFz1ET/fNxBMKaMlMVH18arbiGMYlZI7OBZ89fyj0XSIhgHVlpfWUmsHDVzJl/KoIgUoyRbtLo47ap6v8a2Poa4n964/WssZKlxmEZXeqGrjrtFhYU0Ai7PVO91m72CviQT6YciMYDDXzrsxWmr+BiXMVSRBlDx/Sg4YtOMnJrAaDeQjSeSdI6IStdEqzciHqUBFgj3lg7QiWhU3gTOax241t5IaA27Zvyg57MjS0VD5cCNf0VLMiL2P+jDH+juhf4fRLCFefTNfjHuYaONztlibKuxTgF0o6vWI0sNaRL6bo2XjDOJUcmT63w8rgo5nXcbjbw5L1CNxtzZ sysadmin@test-neoncli
  publicOpenSSH: >
    -----BEGIN RSA PUBLIC KEY-----

    MIIBCgKCAQEAxGe7Fn8Rc9RE/3zcQTCmjJTFR9fGq24hjGJWSOzgWfPX8o9F0iIY

    B1ZaX1lJrBw1cyZfyqCIFKMkW7S6OO2qer/Gtj6GuJ/euP1rLGSpcZhGV3qhq467

    RYWFNAIuz1TvdZu9gr4kE+mHIjGAw1867MVpq/gYlzFUkQZQ8f0oOGLTjJyawGg3

    kI0nknSOiErXRKs3Ih6lARYI95YO0IloVN4EzmsduNbeSGgNu2b8oOezI0tFQ+XA

    jX9FSzIi9j/owx/o7oX+H0SwhXn0zX4x7mGjjc7ZYmyrsU4BdKOr1iNLDWkS+m6N

    l4wziVHJk+t8PK4KOZ13G428OS9Qjcbc2QIDAQAB

    -----END RSA PUBLIC KEY-----

I believe certificate parsing probably handles this, but it could cause trouble elsewhere. This looks like an easy fix:

https://stackoverflow.com/questions/58431796/change-the-scalar-style-used-for-all-multi-line-strings-when-serialising-a-dynam

We can probably just add this to the NeonHelper YAML serializer and it should work everywhere.

@jefflill jefflill self-assigned this May 5, 2023
@jefflill jefflill added bug Something isn't working neon-sdk General neonSDK issues labels May 5, 2023
@jefflill
Copy link
Contributor Author

jefflill commented May 5, 2023

FIXED

@jefflill jefflill closed this as completed May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working neon-sdk General neonSDK issues
Projects
None yet
Development

No branches or pull requests

1 participant