RDoc-4061 + RDoc-4062 + RDoc-4063 Security & Architecture: The appliance surfaces + Operator authentication + Networking & DNS - #2599
Conversation
| is present and functional in the default release image and the source-built image. | ||
| The current dashboard displays the wrapper command, but the Dockerfiles do not package a consistently | ||
| working wrapper/rvn combination. | ||
| */} |
There was a problem hiding this comment.
What is the intended DNS contract for a.<domain> ?
RavenDB advertises it as its PublicServerUrl, so external topology-aware clients can receive it after initially connecting to db.<domain>.
However, Quill currently relies on a.<domain> resolving to loopback, and the DNS update script excludes it.
Should a.<domain> remain loopback-only?
If so, how should external clients connect after receiving it through topology discovery?
Or should it resolve to the instance’s public IP, with Quill’s internal connection adjusted accordingly?
There was a problem hiding this comment.
@Danielle9897 this is tracked, and the contract isn't settled yet, so please don't document either behavior.
current state: the wizard registers all five subdomains at the customer's IP, and update-dns.sh then excludes a. from subsequent updates. that inconsistency is the bug, and the effect is on internal traffic - Quill's calls to ravendb should be loopback and aren't guaranteed to be.
I proposed pinning a. to 127.0.0.1 in dns but @ayende rejected that, because in a clustered setup every node would resolve its peers to itself. he wants us tp override the hostname in the container's /etc/hosts instead, keeping public dns pointing at real IPs.
Under that model, to answer your question directly: a.<domain> is not loopback-only in DNS. It resolves publicly like the others, and external topology-aware clients can use it.
only the container itself short-circuits it to loopback. BUT that's the intended contract, not the implemented one.
db.<domain> remains the documented external entry point either way, so docs can safely say that much.
@karmeli87 can I get this on my board? https://issues.hibernatingrhinos.com/issue/RavenDB-27224/Quill-Wizard-should-always-set-a.domain-DNS-record-to-fixed-127.0.0.1
| The container currently expects it to resolve to loopback, and update-dns.sh excludes it from IP updates. | ||
| However, external RavenDB.Client instances can receive a.<domain> through topology discovery. | ||
| Do not state that operators must or must not repoint this hostname until that contract is settled and tested. | ||
| */} |
There was a problem hiding this comment.
What is the intended supported DNS-update command for users?
The dashboard currently shows:
docker exec quill update-dns --ip <new-ip>
However, the default Dockerfile does not include the update-dns wrapper.
Dockerfile.source includes the wrapper, but it calls /app/ravendb/rvn;
is that executable guaranteed to be present in the source-built image?
Should both image variants be updated and tested to support the wrapper command,
or should the dashboard and documentation show the direct rvn dns update ... command instead?
There was a problem hiding this comment.
that's true. the two dockerfiles acting as different sources of truth, and sure enough they drifted (we had a decision to build it from source and then we told otherwise as we progress ). we need to align Dockerfile with the missing parts that are present on the .source file and drop Dockerfile.source.
can you hold it till then?
ticket:
RavenDB-27372 Quill: align both dockerfiles and eventually drop Dockerfile.source
@karmeli87 can I get it on my board?
Could you please review the remaining parts of this article and the other two articles in the PR? |
There was a problem hiding this comment.
@Danielle9897 I think this PR is not synced with the current work we do.
that's natural, since we still rework things especially around networking. best will be to park this whole PR for a while , until things get settled and then come back to it to update it
| It does not use the Dashboard API key, a browser session, or a client certificate. | ||
| Instead, access is granted by the embed-link token included in the URL. | ||
|
|
||
| nginx forwards only these two routes on `public.<domain>`: |
There was a problem hiding this comment.
ravendb/ravendb#23390 added a third route to this server block. so it's not entirely accurate.
the embed page also loads its widget bundle from /widget/assets/* on the same origin.
might not be so interesting from the user perspective until he decides to put a WAF or something infront the whole thing and the widget stops loading.
@kalczur should we add the assets ep here?
| ``` | ||
| <br/> | ||
|
|
||
| The current nginx front does not preserve the caller's IP address. |
There was a problem hiding this comment.
accurate for the current release, but RavenDB-27364 changes it:
the SNI front now sends the PROXY protocol and the terminators recover the real client address
|
|
||
| The current nginx front does not preserve the caller's IP address. | ||
| The Quill web application and RavenDB see nginx's loopback address instead, | ||
| so downstream logs cannot identify individual callers by source IP. |
There was a problem hiding this comment.
first we don't have access.log enabled - and we should enabled it. second ravendb/ravendb#23400 addresses this by the proxy protocol trick
| so downstream logs cannot identify individual callers by source IP. | ||
|
|
||
| The login endpoint and public chat endpoint both apply IP-based rate limits. | ||
| Because the original caller IP is not preserved, each limit uses one shared appliance-wide bucket instead of separate buckets for individual clients. |
There was a problem hiding this comment.
not true anymore once we merge ravendb/ravendb#23400
| For example, the Quill name `acme` produces the base domain `acme.myquill.ai`. | ||
| In this article, `<domain>` represents this complete base domain. | ||
|
|
||
| Quill provisions four published hostnames beneath the base domain. |
There was a problem hiding this comment.
five records are provisioned. including a.* once this ravendb/ravendb#23416 will be merged. it should be also in the table below. which means a. still accessible from outside - but the comm between ravendb and quill is via lo by overriding /etc/hosts
| -l /var/lib/quill/setup/license.json \ | ||
| -d <domain> \ | ||
| -n <ip-1>,<ip-2>=dashboard,db,public,api | ||
| ``` |
There was a problem hiding this comment.
well it's true, but we have more UXish nicer way for the users
|
|
||
| #### If the command times out | ||
|
|
||
| The command waits up to 15 minutes for the DNS service to complete the request. |
There was a problem hiding this comment.
where is this info from? it's not related to my work I know , but I was under the impression that the timeout is 30m. but I probably wrong. worth rechecking
| nslookup api.<domain> | ||
| nslookup public.<domain> | ||
| nslookup db.<domain> | ||
| ``` |
There was a problem hiding this comment.
a. should be also here after ravendb/ravendb#23416 lands
| | Base domain and hostnames | `<domain>` and the `dashboard`, `api`, `public`, and `db` hostnames keep the same names. | | ||
| | Wildcard server certificate | The certificate is issued for `*.<domain>`, not for a particular IP address. | | ||
| | Activated setup package and license | Your Quill continues using the existing activated setup package and its license file. | | ||
| | Dashboard API key | The key is independent of the host's IP address; supply the same `QUILL_API_KEY` value to a replacement container/ | |
There was a problem hiding this comment.
sorry for pointing out, but spotted it :) there is a stray '/' at the end
|
|
||
| <Admonition type="info" title=""> | ||
|
|
||
| #### The sign-in rate limit is instance-wide |
There was a problem hiding this comment.
whole block will not be true once ravendb/ravendb#23400 will land
Issue link
https://issues.hibernatingrhinos.com/issue/RDoc-4061/Quill-documentation-Security-Architecture-The-appliance-surfaces
https://issues.hibernatingrhinos.com/issue/RDoc-4062/Quill-documentation-Security-Architecture-operator-authentication
https://issues.hibernatingrhinos.com/issue/RDoc-4063/Quill-documentation-Networking-DNS
Additional description
The "Appliance surfaces" article covers:
dashboard.*,api.*,public.*, anddb.*), what each serves, and RavenDB's additionala.*routing aliasThe "Operator authentication" article covers:
The "Networking & DNS" article covers:
===========================
Type of change
/templatesor readme)Changes in docs URLs
/scripts/redirects.jsonfile, setDocuments MovedPR label)Changes in UX/UI