From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 2/2] swim: implement and expose transport-level encryption
Date: Wed, 8 May 2019 12:11:10 +0300 [thread overview]
Message-ID: <20190508091110.GA17434@atlas> (raw)
In-Reply-To: <fb2bdded-1e61-4b5d-fafc-f722e098fccb@tarantool.org>
* Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [19/05/08 12:03]:
First, I think you're solving a non-problem.
There is no big deal in passing the crypto algorithm again.
Second, I think the encryption is optional and fairly independent
on the rest of the so it's OK to set it separately
in swim_set_codec(). No need to rework entire configuration
because of encryption issues.
Otherwise I don't have a strong opinion. Passing -1 is ugly, you
could put a lipstick on the pig by using a special enum value
(SWIM_KEEP_CODEC) instead.
> I rethought the API and decided that it lacks
> flexibility - I can't change private key without
> passing crypto algorithm again, in swim_set_codec.
>
> There are some solutions:
>
> - Move algo and key to swim_cfg, and make both of them
> optional. But it pads out swim_cfg(), which at this moment
> is quite compact, atomic, and contains only really
> necessary parameters.
>
> - Make swim_set_codec arguments optional. Then a one could
> change private key like this: swim_set_codec(-1, new_key).
>
> These solutions are simple and not too intrusive. But probably we
> should do something more global - get rid of swim_cfg and split it
> into separate
>
> swim_set_<option>(option_value)
>
> functions. It will look like this:
>
> swim_listen()
> swim_set_uuid()
> swim_set_ack_timeout()
> swim_set_heartbeat_rate()
> swim_set_gc_mode()
> swim_set_codec()
> swim_set_payload()
>
> Therefore it won't be atomic to update several parameters at once.
> On the other hand, it looks more consistent and just like box.cfg.
> Now the API looks like this:
>
> swim_cfg(uri, heartbeat, ack, gc, uuid)
> swim_set_codec()
> swim_set_payload()
>
> Please, tell your opinion.
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
next prev parent reply other threads:[~2019-05-08 9:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 18:13 [tarantool-patches] [PATCH 0/2] swim crypto Vladislav Shpilevoy
2019-04-29 18:13 ` [tarantool-patches] [PATCH 1/2] swim: split send/recv into phases Vladislav Shpilevoy
2019-04-29 18:13 ` [tarantool-patches] [PATCH 2/2] swim: implement and expose transport-level encryption Vladislav Shpilevoy
2019-05-08 8:52 ` [tarantool-patches] " Vladislav Shpilevoy
2019-05-08 9:11 ` Konstantin Osipov [this message]
2019-05-02 15:43 ` [tarantool-patches] Re: [PATCH 0/2] swim crypto Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190508091110.GA17434@atlas \
--to=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH 2/2] swim: implement and expose transport-level encryption' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox