Skip to content

Examples: Review datasync-server-cosmosdb-singlecontainer sample for UnsafeEntityLogging secure default (#446) #478

@adrianhall

Description

@adrianhall

Summary

v10.1.0 adds the UnsafeEntityLogging option to TableControllerOptions (see #446). When false (the new default) only the entity ID is logged at Information level and the full serialized entity is never written to the logs; when true the full serialized entity is logged at Debug.

This sample is not the docs-tutorial walkthrough, so it should keep the secure default (UnsafeEntityLogging = false). This issue tracks reviewing the sample against v10.1.0 and explicitly documenting the secure default.

Change required

Review samples/datasync-server-cosmosdb-singlecontainer/src:

  • Controllers/TodoItemController.cs
  • Controllers/TodoListController.cs (already sets Options = new TableControllerOptions { EnableSoftDelete = true })

Confirm UnsafeEntityLogging is left at its secure default of false. Optionally add a brief comment near the TableControllerOptions usage noting the option exists and is intentionally left disabled to avoid logging potentially sensitive entity contents.

Acceptance criteria

  • UnsafeEntityLogging remains false (default) in this sample.
  • A comment documents the deliberate secure default where TableControllerOptions is configured.
  • The sample builds and runs against v10.1.0.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExamplesServerImprovements or additions to the server code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions