refactor: remove allow_raw_access#74
Merged
Merged
Conversation
`allow_raw_access` was carried over from the old SDK assets canister. It let an asset owner block serving from the `.raw.ic*` domain by redirecting raw-domain requests to the certified domain. We don't plan to support it, so remove the feature end to end. - canister-core: drop the field from `Asset`/`AssetDetails`, the wire types, stable state, and state-hash input; remove both raw->certified redirect checks from `build_http_response` and the now-unused `req` param. Delete the orphaned raw-domain helpers in `http.rs` (`is_raw_domain`, `redirect_from_raw_to_certified_domain`, `get_canister_id`, `build_redirect`, `get_header_value`, `HTTP_REDIRECT_PERMANENT`) that only existed to support it. - sync-core: drop the field from the canister wire types and stop emitting it in create/property-drift operations. - assets.did + e2e: drop the field from the candid interface and the test helper struct. Assets are now always served on the raw domain without redirect. The candid compatibility test and the canister-core, sync-core, and e2e suites all pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
allow_raw_accesswas carried over from the old SDK assets canister. It let an asset owner block serving from the.raw.ic*domain by redirecting raw-domain requests to the certified domain. We don't plan to support it anymore, so this removes the feature end to end — including the raw-domain redirect machinery it was the sole user of.Changes
Asset/AssetDetails, the wire types (CreateAssetArguments,AssetProperties,SetAssetPropertiesArguments), stable state, and state-hash input.build_http_response(direct asset hit + redirect-rule target) and the now-unusedreq: HttpRequestparameter.http.rsthat only existed to support it:is_raw_domain,redirect_from_raw_to_certified_domain,get_canister_id,build_redirect,get_header_value, and theHTTP_REDIRECT_PERMANENTconst.allow_raw_accesstest module and its now-unused helpers.Behavior change
Assets are now always served on the raw domain without redirect, since per-asset raw blocking no longer exists. Consistent with the repo's no-backward-compatibility stance (no production instances), no shim is left behind. The adjacent
enable_aliasing/is_aliasedignored-compat fields are intentionally left untouched.Testing
cargo build --workspace— cleancargo clippy --workspace --all-targets— no warningscargo test -p canister-core— 99 passedcargo test -p sync-core— 190 passedcargo test -p canister—candid_interface_compatibilitypasses (trimmedassets.didmatches the exported interface)cargo test -p e2e— 12 passed against a live local replica🤖 Generated with Claude Code