Keep an unregistered Endpoint private - #218
Merged
Merged
Conversation
…ported IS_PUBLIC gates the metrics POST to the Federation. The installer wrote it only when a registration was fetched, so declining to register inherited example.env's demo default of True and the Endpoint reported its public IP, organization, name, system usage and catalog counts to a platform it had deliberately not joined. It is now switched off with the rest of the defaults, before the registration block gets its chance to turn it back on from the answer given while registering. Metrics are still collected and logged; nothing leaves the Endpoint. The sequence diagram said the opposite, and now matches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #217.
Answering no to Register this Endpoint with the Federation now? is supposed to produce a standalone Endpoint. It was not one:
IS_PUBLICwas written only when a registration was fetched, so declining left theTruethatexample.envcarries as a demo default, withMETRICS_ENDPOINTstill pointing at the Federation.The Endpoint then posted its public IP, organization, endpoint name, system usage and catalog counts every 3300 seconds to a platform it had deliberately not joined — and the Federation accepted them with
201 Created.The fix
IS_PUBLIC=Falsenow goes in with the rest of the defaults, before the registration block, which is the only thing that turns it back on and does so from the answer given while registering. Installing with--config-id, or answering yes, behaves exactly as before.example.envnow says thatIS_PUBLICis what allows metrics to be posted, which was documented nowhere.Verified
IS_PUBLIC=False, and the Endpoint running with that.envposted nothing: zero matches for a metrics POST in its logs after startup, while the metrics task kept collecting and logging locally.black --check .andflake8clean.Backwards compatibility
Only new installations are affected. An existing
.envkeeps whateverIS_PUBLICit has — set it toFalseby hand on an Endpoint that should not be reporting.