Class PushCredentialsFile

java.lang.Object
com.iizix.server.push.engine.http.PushCredentialsFile

public final class PushCredentialsFile extends Object
The parser of the Push Notification (PN) credentials file, PUSH-CREDENTIALS.md section 3: UTF-8, unix-style ini, a byte-order mark ignored, LF or CRLF, # or ; comments, case-insensitive section names, the sections [users], [groups], [members] and [server], each optional and each at most once.

[server] (section 3.6, ruled 2026-09-26) is the PN configuration of application ID *: the members VPubKey, VPrivKey, VSubject, fcmProject, fcmServiceAccountFile and, since PUSH-KEYFILES-DESIGN.md (K-7), VPrivKeyFile, named as PushProps names them, matched in any case; an unknown name is a WARNING naming the line and is ignored (S-1); an empty value is an absent member; the VAPID pair is both keys or neither, each valid and the two belonging together, else SEVERE and the pair is ignored (S-2) - unless VPrivKeyFile names the pair's file, when an inline VPrivKey is a WARNING and ignored. The paths in fcmServiceAccountFile and VPrivKeyFile are kept as written; the loader resolves and reads them.

Pure. No I/O and no logging: parse(byte[],String) answers a PushCredentialsFile.Parsed that carries the valid entries and a PushCredentialsFile.Diagnostic per refusal or warning, which the loader logs. A diagnostic names the file and the line number and never a line's content, a password or a hash (section 8): a duplicate user, a user in no group and a member line without a user name the user ID, because the operator needs it to act.

What is refused, and how (sections 3.1 to 3.3): a user line that is not userID TAB type TAB password, a user ID with whitespace or a colon, a password type that is not IZ1, sha512, sha256 or plain - the weaker ones (md5, sha1, sha224, crypt, des, ntlm) are refused by name - a plain password ending in a space or TAB, a hash of the wrong shape, a duplicate user ID (both lines), a group with an unknown privilege (the group grants nothing), a line outside any section, an unknown section and a section that appears twice. Every refusal is SEVERE and the line is ignored; the valid lines still apply.

Author:
Christopher Mindus