Skip to content

Legacy resource access validation

This operation exists for callers that have not yet migrated to the WCF SecurityService path: it authorizes a resource request through the older ASMX clsADServices web service instead, using its own (different) environment-suffix convention. clsAccountMaintProxy exposes four near-identical entry points — internal vs. external domain, cached vs. uncached — that all funnel through this same logic.

Field Value
Operation ID OP-006
Trigger Caller invokes a ResourceAccessValid* method
Inputs Mail ID and base resource name
Outputs Boolean authorization decision
Primary components clsAccountMaintProxy.ResourceAccessValid, ResourceAccessValidCached, ResourceAccessValidExternal, ResourceAccessValidCachedExternal, GetADService
Entry point SAIF.Framework.Security\clsAccountMaintProxy.vb

Steps

  1. Whichever public method the caller invokes first resolves a fresh clsADServices proxy through GetADService(), which reads legacyADServiceUrl from the environment service and assigns it as the proxy's endpoint — a new proxy is created on every call, with no reuse or caching.
  2. The entry point the caller chose then determines which underlying ASMX operation to invoke: HasAccess (internal, uncached), HasAccessCache (internal, cached), HasAccessExternal, or HasAccessCacheExternal.
  3. Authorization context: these four operations are the programmatic checks listed in Programmatic authorization checks.
  4. When the application is not running in production, the method appends a plain Test suffix to the resource name before making the ASMX request; production calls send the base resource name unchanged — enforcing BR-002, a convention that differs from the TestResource suffix used by the WCF path.
  5. The method returns the boolean result from the selected ASMX operation directly, with no local post-processing.
  6. On failure: ASMX endpoint or transport exceptions are not caught locally and propagate to the caller.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Legacy check requested]) --> Proxy[Create clsADServices proxy]
    Proxy --> Variant[Select access method variant]
    Variant --> Env{Production?}
    Env -->|Yes| CallProd[Call with base resource]
    Env -->|No| CallTest[Append Test and call]
    CallProd --> Decision{Authorized?}
    CallTest --> Decision
    Decision -->|Yes| EndOk([Return True])
    Decision -->|No| EndErr([Return False])

Failure and edge-case behavior

  • Every request creates a new ASMX proxy instance rather than reusing a cached client.
  • Non-production requests use the legacy plain Test suffix, not the TestResource suffix applied by the WCF-based resource check.
  • Service failures propagate unchanged to the caller.

Sources

  • SAIF.Framework.Security\clsAccountMaintProxy.vb