SNI-like routing

SERVANT Cyril cyril.servant at cea.fr
Mon Sep 26 22:15:20 AEST 2022


Le 26/09/2022 à 12:21, Brian Candler a écrit :
> On 26/09/2022 10:48, SERVANT Cyril wrote:
>> And then, in /etc/sshproxy/sshproxy.yaml :
>>
>> users:
>> 	- foo
>> 		routes:
>> 			default:
>> 				dest: [ip.of.foo.vm]
>> 	- bar
>> 		routes:
>> 			default:
>> 				dest: [ip.of.bar.vm]
> 
> FWIW, that isn't valid YAML <http://www.yamllint.com/>, but it's OK once you add a colon after each username.
> 
> users:
>         - foo:
>                 routes:
>                         default:
>                                 dest: [ip.of.foo.vm]
>         - bar:
>                 routes:
>                         default:
>                                 dest: [ip.of.bar.vm]

You're 100% correct, my bad. This is the right syntax.

> Regards,
> 
> Brian.
> 
> P.S. I can't see why the YAML config uses an extra level of object nesting.  I would have expected the top level to be either a list (of rules
> to be tried in sequence):
> 
> ---
> users:
>   - username: foo
>     routes:
>       default:
>         dest: [ip.of.foo.vm]
>   - username: bar
>     routes:
>       default:
>         dest: [ip.of.bar.vm]

It makes sense. I really like this.

> or an object (for direct lookup of username into a map):
> 
> ---
> users:
> 
>   foo:
>     routes:
>       default:
>         dest:  [ip.of.foo.vm]
> 
>   bar:
>     routes:
>       default:
>         dest: [ip.of.bar.vm]

I need an ordered list, so your fist proposal is better in this case.

Thanks for the input.
-- 
Cyril


More information about the openssh-unix-dev mailing list