一个用于 Minecraft 1.20.1 Fabric 的补丁(mixin)模组,由 NikitaCartes 开发的 EasyAuth 模组提供本地存储会话功能,以实现自动授权,让离线玩家无需密码即可无缝登录。
功能特性
- 客户端:根据服务器请求实现无缝授权
- 客户端:首次使用密码认证成功后,存储生成的授权令牌
- 客户端:如果服务器不接受授权令牌(例如服务器上未安装此补丁或授权令牌无效),则回退到常规行为
- 客户端:本地存储的授权令牌使用从玩家 UUID 和服务器 IP 地址派生的密钥进行加密(AES-GCM-256)
- 客户端:通过对派生密钥进行哈希处理来进一步保护授权令牌,防止设备上的恶意软件窃取
- 服务器:生成的授权令牌经过哈希处理,以防范文件系统入侵攻击
客户端保存的授权令牌(用于你加入的服务器)存储在 config/EasyAuthLocalSessions-client/ 目录中。
服务器端保存的授权令牌(用于加入你服务器的玩家)存储在 EasyAuth/EasyAuthLocalSessions-server 目录中。
安装
服务器端:
- 下载此模组至服务器
- (可选但强烈建议!)在
config/EasyAuth/main.conf 中将 session-timeout 设置为 -1,以禁用 IP 授权(这与本模组配合使用时是不安全的且不必要的)
客户端:
出于明显的原因,请勿将此模组安装在公用电脑上,或在离开时输入 /logout
- 下载此模组至客户端
- 加入服务器并首次仅一次使用你的密码登录
- 此后,每次你加入服务器(且服务器提示需要授权)时,模组将静默发送授权令牌
- 如果你想停止此行为,在你想要登出的服务器上输入
/logout
- 如果你认为你的授权令牌已泄露,更改密码 将撤销该账户在服务器上的所有授权令牌
重要注意事项:
- 本地存储的授权令牌与确切的服务器地址(见 问题 #1)和玩家 UUID(对于离线玩家,由用户名派生)绑定
- 如果服务器更改了 IP 地址、端口或域名,你必须重新进行授权。即使你加入的是
example.org:25565 而不是 example.org,它也会被视为具有独立令牌的独立服务器(见 问题 #1)。反之亦然,如果有人在同一域名或 IP 地址下托管服务器,模组会将授权令牌发送给该服务器,这可能导致重放攻击。
参见 问题 #2
A Minecraft 1.20.1 Fabric patching (mixin) mod that adds locally stored sessions for automatic authorization in EasyAuth by NikitaCartes mod to provide seamless login without password for offline players.
Features
- Client: Seamless authorization per request by server
- Client: Stores generated authorization token after authenticating with password for the first time
- Client: Fallback to usual behaviour if server does not accept authorization token (e.g. this patch is not installed on
server or authorization token is invalid)
- Client: Authorization tokens stored locally are encrypted with a key derived from player UUID and IP address of the
server (AES-GCM-256)
- Client: Authorization tokens are further protected by hashing the derived key to protect them from malware on device
- Server: Generated authorization tokens are hashed to mitigate filesystem breach attack
Client-side saved authorization tokens (for servers you join) are stored in config/EasyAuthLocalSessions-client/
directory
Server-side saved authorization tokens (for players joining your server) are stored in
EasyAuth/EasyAuthLocalSessions-server
Install
Server:
- Download this mod to server
- (optional but HIGHLY RECOMMENDED!) Set
session-timeout to -1 in config/EasyAuth/main.conf to disable IP
authorization (which is insecure and unneeded with this mod)
Client:
For obvious reasons, don't install this mod to guest computers or type /logout when you're leaving it
- Download this mod to client
- Join the server and login with your password for the first and only time
- From now on, every time you're joining the server (and server prompts to authorize) the mod will silently send
authorization token
- If you want to stop this behaviour, type
/logout on the server you want to log out from
- If you believe your authorization token was
compromised, changing password revokes all authorization tokens on
the server for your account
Important caveats:
- Locally stored authorization tokens are tied to the exact server address (see
issue #1) and player UUID (derived
from
name for offline players)
- If a server changes IP address, port, domain, you'll have to authorize again. Even if you join
example.org:25565
instead of example.org it will be considered a separate server with separate tokens (
see issue #1). And vice
versa, if someone hosts a server under the same domain or IP address, the mod will send the authorization token to it,
which can then be used in replay attacks.
See issue #2
评论 0
登录后参与评分
还没有评论,来抢沙发吧