Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extensions/cap_realhost #13

Merged
merged 6 commits into from
Oct 24, 2020
Merged

Add extensions/cap_realhost #13

merged 6 commits into from
Oct 24, 2020

Conversation

edk0
Copy link
Contributor

@edk0 edk0 commented Oct 18, 2020

Implements the solanum.chat/realhost client capability, which sends the solanum.chat/realhost and solanum.chat/ip vendor tags on user-sourced messages as appropriate.

Hidden IPs and hostnames are sent to auspex:hostname opers. For consistency, if a remote oper wouldn't see an IP (because it's behind an IP spoof and not propagated), it's not shown to local opers either. Internally the oper version of the tag is implemented with an invisible cap named ?oper_realhost.


originally: I'm not terribly happy with the state of this, but improving it depends on having tags that are gated by privs, which may itself depend on changing how privsets work.

Ideally the cap would be available to all users, but just wouldn't reveal hidden information to the unprivileged.

@dwfreed
Copy link
Member

dwfreed commented Oct 19, 2020

The ideal would be possible if the outbound_msgbuf hook included the target information. Otherwise, seems fine to me.

@edk0
Copy link
Contributor Author

edk0 commented Oct 19, 2020

As it stands the hook is called just once for something like a channel message, even though it goes out to lots of users, and the send machinery takes care of formatting different concrete lines for people with distinct capability sets. I'd like to keep that, so we probably need to teach the sending stuff about privs.

@edk0 edk0 force-pushed the edk/cap-realhost branch 3 times, most recently from 68ebe7a to fc11487 Compare October 22, 2020 15:27
@edk0 edk0 marked this pull request as ready for review October 22, 2020 15:27
@ncoevoet
Copy link

Sigyn approves

jesopo
jesopo previously approved these changes Oct 22, 2020
jesopo
jesopo previously approved these changes Oct 22, 2020
extensions/cap_realhost.c Outdated Show resolved Hide resolved
extensions/cap_realhost.c Outdated Show resolved Hide resolved
@edk0 edk0 merged commit 8a776ce into main Oct 24, 2020
@edk0 edk0 deleted the edk/cap-realhost branch October 24, 2020 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants