Skip to content

fix: correct FoD session login credential grouping and tenant option usage#942

Closed
SangameshV wants to merge 13 commits intodev/v3.xfrom
fix/v3.x/fod-session-login-options
Closed

fix: correct FoD session login credential grouping and tenant option usage#942
SangameshV wants to merge 13 commits intodev/v3.xfrom
fix/v3.x/fod-session-login-options

Conversation

@SangameshV
Copy link
Contributor

The --tenant option was not displayed as mandatory for the fcli fod session login command when using the username/password option group. It is now required when username and password are provided, but not when using the client-id and client-token options.

Copilot AI and others added 13 commits November 26, 2025 05:03
Implements a lightweight JSON-RPC 2.0 server accessible via 'fcli util rpc-server start'.
This provides programmatic access to fcli functionality for IDE plugins.

Key features:
- Custom JSON-RPC 2.0 implementation (no external dependencies, GraalVM compatible)
- RPC methods: fcli.execute, fcli.listCommands, fcli.version, rpc.listMethods
- Pagination support for record-producing commands
- Structured JSON responses for IDE integration

Reuses patterns from MCP server implementation.

Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
- Remove unused ExecutorService and thread pool parameter from JsonRpcServer
- Add validation for limit (must be > 0) and offset (must be >= 0) parameters
- Cache qualifiedName in local variable in filter lambda
- Use JsonRpcError.INTERNAL_ERROR constant in fallback error response

Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
- Create shared _common/helper package with reusable components:
  - FcliRecordsCache: Background loading and caching for large result sets
  - FcliToolResult: Unified result class for fcli command execution
  - FcliRunnerHelper: Helper methods for running fcli commands

- Add new RPC methods for async execution and cache management:
  - fcli.executeAsync: Start background collection, returns cacheKey
  - fcli.getPage: Retrieve page from cache by cacheKey with wait option
  - fcli.cancelCollection: Cancel in-progress collection
  - fcli.clearCache: Clear cache entries

- Update documentation and tests for new methods

Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
- Add fcli.ssc.login, fcli.ssc.logout for SSC sessions
- Add fcli.fod.login, fcli.fod.logout for FoD sessions
- Auto-logout all sessions when RPC server terminates
- Auto-add session options to commands based on product type
- Remove paging from fcli.execute (use async methods for large datasets)
- Improve argument quoting to prevent injection issues
- Fix logoutAll to avoid duplicate logout attempts
- Update documentation and tests

Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
Per review feedback:
- Removed ci-token (equivalent to token)
- Added client-auth-token for SC-SAST authentication
- Added sc-sast-url for SC-SAST controller URL
- insecure mode already supported for both login methods

Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
- Remove ci-token (now just use token for both UnifiedLoginToken and CIToken)
- Add client-auth-token and sc-sast-url for SC-SAST authentication
- Fix authentication note to reflect current implementation

Co-authored-by: rsenden <8635138+rsenden@users.noreply.github.com>
…fcli' into sangamesh/latest-mcp-json-rpc-impl
…Options and Generic Options for util all-commands commad output in json format
…all-commands list -o json to facilicate IDE plugin development
@SangameshV SangameshV marked this pull request as draft March 6, 2026 12:03
@SangameshV SangameshV closed this Mar 6, 2026
@SangameshV SangameshV deleted the fix/v3.x/fod-session-login-options branch March 6, 2026 12:05
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