Skip to content

Conversation

@horvbalint
Copy link
Contributor

The current docs states that the bucket path is validated against the SURREAL_FILE_ALLOWLIST env var when defining a new bucket.
I think this is not right and the correct env var is SURREAL_BUCKET_FOLDER_ALLOWLIST. Only the latter one worked for me, I am not sure what the first one is used for.

This PR simply replaces it in the docs.

@netlify
Copy link

netlify bot commented Nov 9, 2025

👷 Deploy request for surrealdb-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 59d8c2a

@Dhghomon
Copy link
Contributor

Hi @horvbalint,

I see that we actually have both:

/// Specifies a list of paths in which files can be accessed (default: empty)
pub static FILE_ALLOWLIST: LazyLock<Vec<PathBuf>> = LazyLock::new(|| {
	std::env::var("SURREAL_FILE_ALLOWLIST")
		.map(|input| extract_allowed_paths(&input, true, "file"))
		.unwrap_or_default()
});

/// Specifies a list of paths in which files can be accessed (default: empty)
pub static BUCKET_FOLDER_ALLOWLIST: LazyLock<Vec<PathBuf>> = LazyLock::new(|| {
	std::env::var("SURREAL_BUCKET_FOLDER_ALLOWLIST")
		.map(|input| extract_allowed_paths(&input, false, "bucket folder"))
		.unwrap_or_default()
});

I think the file one might be for finer-grained access but will check before changing their descriptions. In the meantime you could change the PR to add them as above with the same description for each and then I'll see what examples can be provided to show the difference between the two.

Thanks again!

@horvbalint
Copy link
Contributor Author

@Dhghomon I also saw, that both of them exists, but I could not figure out what FILE_ALLOWLIST is used for. I think I would wait until you (or someone else from the team) confirms what it does and then update the PR

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.

2 participants