Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions src/otdf_python/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,21 +355,8 @@ def cmd_inspect(args):
# Validate input file
input_path = validate_file_exists(args.file)

# For inspection, try to create authenticated SDK, but allow unauthenticated inspection too
try:
try:
sdk = build_sdk(args)
except CLIError as auth_error:
# If authentication fails, create minimal SDK for basic inspection
logger.warning(f"Authentication failed, using minimal SDK: {auth_error}")
builder = SDKBuilder()
if args.platform_url:
builder.set_platform_endpoint(args.platform_url)
if hasattr(args, "plaintext") and args.plaintext:
builder.use_insecure_plaintext_connection(True)
if args.insecure:
builder.use_insecure_skip_verify(True)
sdk = builder.build()
Comment on lines 358 to -372
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change removes the logic for creating a 'minimal' SDK for unauthenticated inspection, which appears to be a functional regression. Previously, it was possible to inspect a TDF's manifest without providing authentication credentials, as the code would fall back to a minimal SDK capable of parsing the TDF structure. With this change, any authentication failure during SDK building results in a very basic inspection that only reports file type and size, losing the valuable ability to view the manifest without full credentials. If retaining unauthenticated manifest inspection is desired, the previous logic should be restored, possibly in a more robust implementation.

sdk = build_sdk(args)

try:
# Read encrypted file
Expand Down
Loading