Hi,
I'd like to implement support for using one bastion per log in lite witness. And I need a bit of advice before I start.
How should it be configured?
It will be unwieldy to do on the command line, so bastion config should probably go in the sqlite database. Should that be a separate table (say, origin (primary key) and bastion host), or an additional field in the log table?
How to limit bastion traffic to relevant log?
When connecting to a log-specific bastion, I think that connection should exclusively accept add-checkpoint requests from that log. And if there's a one or more catch-all bastions configured as well, those should only accept add-checkpoint requests from logs that don't have their own bastion.
So for each bastion connection, there should be a filter on acceptable origin lines. How to organize that? Either we would need to read the request close to the bastion connection, and decide whether to forward it to the witness or not. Alternatively, attach expected origin line(s) as metadata on the request context before it is passed to Witness.ServeHTTP ? Maybe there are other options as well?
Rate limit?
It would be nice to have some way configure rate limit for each bastion, and disconnect from the bastion (to reconnect sometime later) in case we get flooded with traffic.
Hi,
I'd like to implement support for using one bastion per log in lite witness. And I need a bit of advice before I start.
How should it be configured?
It will be unwieldy to do on the command line, so bastion config should probably go in the sqlite database. Should that be a separate table (say, origin (primary key) and bastion host), or an additional field in the log table?
How to limit bastion traffic to relevant log?
When connecting to a log-specific bastion, I think that connection should exclusively accept add-checkpoint requests from that log. And if there's a one or more catch-all bastions configured as well, those should only accept add-checkpoint requests from logs that don't have their own bastion.
So for each bastion connection, there should be a filter on acceptable origin lines. How to organize that? Either we would need to read the request close to the bastion connection, and decide whether to forward it to the witness or not. Alternatively, attach expected origin line(s) as metadata on the request context before it is passed to Witness.ServeHTTP ? Maybe there are other options as well?
Rate limit?
It would be nice to have some way configure rate limit for each bastion, and disconnect from the bastion (to reconnect sometime later) in case we get flooded with traffic.