{"record":{"id":"aded24dd6e1ac407","repo":"hasura/graphql-engine","slug":"authconfig-v2-is-deprecated-please-consider-upgra","errorCode":null,"errorMessage":"AuthConfig v2 is deprecated. Please consider upgrading to AuthConfig v4.","messagePattern":"AuthConfig v2 is deprecated\\. Please consider upgrading to AuthConfig v4\\.","errorType":"error_code","errorClass":"Warning","httpStatus":null,"severity":"warning","filePath":"v3/crates/auth/hasura-authn/src/lib.rs","lineNumber":266,"sourceCode":"                      }\n                    }\n                }\n            ),\n            jsonpath::JSONPath::new(),\n        )\n        .unwrap()\n    }\n}\n\n/// Warnings for the user raised during auth config generation\n/// These are things that don't break the build, but may do so in future\n#[derive(Debug, PartialEq, thiserror::Error)]\npub enum Warning {\n    #[error(\n        \"AuthConfig v1 is deprecated. `allowRoleEmulationBy` has been removed. Please consider upgrading to AuthConfig v4.\"\n    )]\n    PleaseUpgradeV1ToV4,\n    #[error(\"AuthConfig v2 is deprecated. Please consider upgrading to AuthConfig v4.\")]\n    PleaseUpgradeV2ToV4,\n    #[error(\"AuthConfig v3 is deprecated. Please consider upgrading to AuthConfig v4.\")]\n    PleaseUpgradeV3ToV4,\n    #[error(\"Header '{0}', used in the auth config, is not a valid header name\")]\n    InvalidHeaderName(String),\n    #[error(\"Header value '{0}' is not a valid header value for header '{1}' in the auth config\")]\n    InvalidHeaderValue(String, String),\n}\n\nimpl Warning {\n    pub fn should_be_an_error(&self, flags: &open_dds::flags::OpenDdFlags) -> bool {\n        match self {\n            Warning::InvalidHeaderName(_) | Warning::InvalidHeaderValue(_, _) => {\n                flags.contains(open_dds::flags::Flag::DisallowInvalidHeadersInAuthConfig)\n            }\n            _ => false,\n        }\n    }","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/auth/hasura-authn/src/lib.rs#L248-L284","documentation":"A warning emitted during auth config generation when the metadata declares AuthConfig v2. v2 is deprecated; the build still succeeds but future releases will reject it, so an upgrade to v4 is recommended.","triggerScenarios":"Auth config generation encounters an AuthConfig with version: 2 in the OpenDD metadata.","commonSituations":"Long-lived projects carrying v2 auth metadata through an engine upgrade without running the metadata migration tooling.","solutions":["Run the provided OpenDD metadata migration to upgrade the auth config to v4","Manually update `version: 2` to `version: 4` and adjust any v2-only fields per the v4 schema","Validate the upgraded metadata with the build; treat remaining warnings as errors to catch regressions"],"exampleFix":"// before\nauthConfig: { version: 2 }\n// after\nauthConfig: { version: 4 }","handlingStrategy":"validation","validationCode":"if auth_config.version != 4 {\n    eprintln!(\"warning: AuthConfig v{} is deprecated; upgrade to v4\", auth_config.version);\n}","typeGuard":"fn isSupportedAuthConfig(v: u32) -> bool { v == 4 }","tryCatchPattern":"match build_auth_config(&metadata) {\n    Err(e) if e.to_string().contains(\"AuthConfig v2 is deprecated\") => plan_migration(e),\n    r => r,\n}","preventionTips":["Upgrade auth config versions during scheduled migration windows","Keep a golden metadata fixture asserting version == 4 in CI","Subscribe to deprecation announcements"],"tags":["auth","deprecation","auth-config","migration"],"backgroundTag":"deprecated-api-version","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}