Microsoft SC-500 Practice Test 36
Question 350
A route table was corrected after an NSG and firewall investigation. How should the engineer verify the issue is actually resolved?
- Rely on the fact that the configuration save operation returned success.
- Delete historical connection diagnostics so only the new state is visible.
- Repeat Network Watcher tests using identical source/destination, port and route assumptions and compare results.
- Grant additional subscription permissions to all test accounts as a guarantee that packets can flow.
Explanation
Correct Answer
C:Run the same next-hop, effective route, flow or connection checks used before remediation. Confirm the intended firewall hop and policy match, test allowed and denied applications, and inspect monitoring after propagation. A consistent repeat test provides stronger evidence than a general connectivity claim from a different endpoint. Confirm the destination and return path after propagation, and repeat a denied access test to catch overbroad corrections.
Incorrect Answers
A:A successful API update proves the change was accepted, not that it won route precedence or fixed the exact application connection. A successful configuration save could leave a more-specific conflicting route selected for the actual production destination.
B:Removing prior evidence prevents before/after comparison and can hide regressions. Retain the original test parameters and results. Keep the original diagnostic outputs to demonstrate that the same route or connection defect has genuinely been corrected.
D:Management role grants are unrelated to route forwarding and can mask a separate access-control issue. Validate networking without unnecessary privilege escalation. Azure management grants cannot repair incorrect UDRs or firewall rule matches governing IP packets.
Question 351
A CI pipeline needs to pull approved container images from Azure Container Registry, but developers currently use the registry's shared admin credentials. Which access pattern is preferable?
- Give the pipeline subscription Owner and retain registry admin user authentication as a fallback.
- Use a managed or federated workload identity with appropriate AcrPull or equivalent scoped repository permissions.
- Enable anonymous pull on every repository to eliminate credential management entirely.
- Copy the admin password into every Kubernetes manifest so image pulls keep working after rotation.
Explanation
Correct Answer
B:Bind the pipeline's trusted workload identity to the registry and grant only required pull access at supported scope. Disable unnecessary admin credentials, verify image digest retrieval and audit access. Distinguish build/push permissions from deployment-time pull so a compromised deployment system cannot overwrite trusted artifacts. Verify pull succeeds with the narrow role but a registry push is denied for the same deployment identity.
Incorrect Answers
A:Owner grants unrelated management authority and a shared admin credential remains reusable if copied. Limit the pipeline identity to necessary image-pull operations on the registry. Shared administrator credentials often authorize image pushes as well as pulls, expanding the effect of a compromised deployment job.
C:Anonymous registry access can expose proprietary releases to unintended consumers and does not satisfy the requirement that only the approved pipeline may pull images. Configure authenticated least privilege. Anonymous image pull violates access restrictions for unreleased software even when the repository's name is not advertised.
D:Manifest distribution and repository history can expose a privileged secret. Use scoped identity and approved image-pull integration instead of embedding long-lived administrator credentials. Manifests may be retained in Git and cluster history, creating multiple persistent copies of the admin password.
Question 352
A platform team wants to prove that AKS deploys the exact container artifact approved by its release pipeline. What should it implement?
- Deploy by mutable 'latest' tags only and trust the tag's human-readable name.
- Assume an image is trusted whenever it comes from an internal registry, regardless of its build source.
- Use supported artifact signing or attestation and immutable image digest verification in the deployment policy.
- Check only the image's compressed size because identical-sized images must contain identical code.
Explanation
Correct Answer
C:Record the approved image digest and, where supported, validate its signature or supply-chain attestation before admission or rollout. Protect signing keys, verify trusted issuers and test that an altered artifact is rejected. Combine provenance checks with vulnerability assessment because integrity does not guarantee that included packages are safe. Test that tampering with the image digest or signature causes admission to reject the unapproved artifact.
Incorrect Answers
A:A mutable tag can point to different image contents at different times. Approval should bind to an immutable artifact identity and verified integrity evidence. A tag can be reassigned after approval, so an immutable digest is needed for reliable binary identity checks.
B:Registry location alone does not prove the image was built from approved code or remained unchanged. Internal credentials and build chains can also be compromised. An internal registry does not verify source code review, build provenance or the absence of malicious package changes.
D:Different artifacts can have the same byte size; size is not a cryptographic integrity proof. Verify an immutable digest and authenticated provenance instead. Cryptographic hashes detect content changes where equal file sizes cannot; size checks give no meaningful trust guarantee.
Question 353
ACR's administrator user remains enabled and several old tokens with broad repository privileges are still active. What should administrators do?
- Inventory active consumers, disable the admin user where feasible, rotate or revoke stale tokens and restrict access scopes.
- Publish the admin password in a central build log to identify consumers.
- Add more full-access tokens to reduce the likelihood of a deployment failure.
- Rename the admin user while leaving the same password and token grants active.
Explanation
Correct Answer
A:Determine which deployments still rely on broad credentials, migrate them to appropriate managed identity, service principal or repository-scoped tokens, and retire unused authentication paths. Validate image pulls and pushes after changes and inspect access records for unexpected use. A private registry does not make unrestricted admin credentials harmless. Review repository write permissions separately from image pull, because a stale admin account can modify trusted artifacts.
Incorrect Answers
B:Logging a sensitive credential creates additional copies and does not reveal which systems actually require access. Use nonsecret telemetry and controlled credential migration. Central logs can be read by many operators and integrated tools, making credential publication a new secret incident.
C:Additional privileged credentials expand the attack surface and complicate rotation. Remove unused access and issue task-scoped credentials. Additional privileged tokens increase the number of independent secrets attackers can steal from CI and workloads.
D:A display-name change does not invalidate existing usable secrets. Credential revocation and scope reduction are required. Changing the username display label does not invalidate passwords, tokens or other active registry authentication material.
Question 354
A Container App must retrieve API credentials from Key Vault without storing them directly in its environment variables. Which design fits?
- Put the vault's secret value in the container image at build time.
- Give the app's service identity subscription Owner because it needs to read one secret.
- Send the secret through a publicly accessible startup log and delete the log afterward.
- Enable a managed identity for the Container App and authorize only the needed vault secret access or reference.
Explanation
Correct Answer
D:Use the supported Container Apps identity and Key Vault integration, grant a narrowly scoped secret-read role and ensure any required private DNS/network access. Validate runtime retrieval and rotation without printing sensitive values. Application identity and network connectivity remain separate prerequisites, and both should be tested before production release. Check the real Container App identity and vault network path before claiming the production secret integration is working.
Incorrect Answers
A:A baked image may be copied into registries and caches, and the secret cannot be safely rotated without rebuilding every dependent artifact. Use runtime identity-based access. Image layers may remain in local caches and registry backups long after a deployment moves to a new release.
B:Owner grants unrelated management and delegation capabilities. A narrow Key Vault data-plane permission is sufficient for supported secret access. The correct Key Vault secret reader needs only narrow data access, not broad subscription management permission.
C:Logs can be retained, replicated or exported before deletion. Avoid copying the credential into diagnostic output during container initialization. Startup logs often enter aggregated telemetry and ticket exports where deleting the original line cannot remove copies.
Question 355
A Container Apps workload serves an internal HR API. It must not accept unauthenticated internet traffic. What networking configuration should be checked?
- Enable external ingress to simplify routing and rely on a hard-to-guess hostname.
- Use appropriate internal Container Apps environment/ingress settings and validate private client reachability and authorization.
- Allow all origins in CORS and assume browsers cannot find the endpoint.
- Store the API credentials in a public image repository because the service's address is internal.
Explanation
Correct Answer
B:Confirm the environment network type and whether the specific app uses internal-only ingress under the supported feature. Test from an authorized VNet client and from an unapproved public source. Preserve backend identity checks even when ingress is private, and verify any gateway or DNS configuration does not inadvertently expose the service. Verify denied unauthenticated public calls and successful authorized private calls after configuring internal ingress and networking.
Incorrect Answers
A:External ingress can create public reachability. A long hostname is not authorization, and HR data should remain behind the intended private boundary. A hidden address is still externally reachable if public ingress is enabled, even when no link appears in documentation.
C:CORS is a browser-based policy, not a general network access restriction. Nonbrowser clients can still reach an external API if the endpoint is public. CORS does not prevent scripts or curl from directly sending requests to an internet-exposed backend endpoint.
D:Secret distribution is an independent risk and a public registry can expose credentials. Use supported identity and secret controls alongside private ingress. Private networking does not make embedding API credentials in a public image or build log acceptable.
Question 356
An Azure Container Instance needs to pull private release images from Azure Container Registry. What authentication approach reduces credential handling risk?
- Set the registry to anonymous public pull so no private authentication is required.
- Write a permanent registry admin password into the Container Instance image and keep it unchanged.
- Use supported managed identity authentication to ACR with appropriately scoped image-pull permission.
- Give every developer Owner on the ACR resource so deployments automatically authenticate.
Explanation
Correct Answer
C:Configure the Container Instance's identity, grant the necessary pull role at the registry or supported repository scope, and verify registry network reachability. Test pulls using the intended image digest without distributing an admin password to deployment files. Preserve separate build-push identities with no unnecessary write rights. Test an image pull using the actual Container Instance identity and verify that push operations remain unauthorized.
Incorrect Answers
A:Public pull can expose release artifacts and contradicts the private registry requirement. Use a scoped identity with supported access rights. An anonymous registry can disclose confidential binaries or release metadata to clients never approved for image access.
B:Embedded credentials can be recovered from image layers and copies. A compromised deployment could then push or pull unrelated artifacts if the admin identity is overly broad. Image layers and cluster manifests are durable copies, so static passwords can survive well beyond a single container run.
D:Azure management rights for humans do not replace the runtime's pull identity, and Owner is excessive. Grant the workload the specific data-plane/image-pull permission. Azure resource management Owner rights do not automatically authenticate a container runtime to a private ACR repository.
Question 357
Two Container Apps in the same environment handle payroll and public notifications. They must not communicate except through approved internal endpoints. What should the platform engineer validate?
- Supported environment networking, app ingress settings and explicit east-west access controls or segmentation patterns.
- Only the names of the Container Apps, because different names mean automatic denial.
- That both apps share a common secret so they can authenticate to one another.
- That external ingress is enabled for both apps, since public endpoints make segmentation easier.
Explanation
Correct Answer
A:Container Apps networking behavior depends on environment and ingress configuration. Design permitted service-to-service routes and identity authentication, using supported private networking or separate environments where isolation requires it. Test prohibited connections in both directions and confirm required infrastructure traffic still works. Namespaces or app labels alone are not proof of network separation. Test both directions between the payroll and notification applications, not merely the settings displayed in the portal.
Incorrect Answers
B:Distinct resource names prevent collisions but do not act as a network policy. Determine effective ingress and reachability under the environment configuration. Distinct app names do not prevent a packet from reaching a shared environment's internal listener or ingress route.
C:A shared credential broadens access and defeats the intended separation. Use unique scoped identities and only authorized connections. Common credentials would weaken separation if either workload is compromised, even when the network path is otherwise restricted.
D:External exposure increases the reachable attack surface and does not solve east-west isolation. Keep private endpoints for sensitive payroll traffic where supported. Publishing both services externally increases unsolicited traffic and can bypass the intended internal application boundary.
Question 358
An HTTP-triggered Azure Function processes employee records. It currently accepts anonymous calls. How should access be restricted to authenticated employees?
- Rely solely on the Function URL's obscurity and leave the trigger anonymous.
- Configure supported App Service Authentication/Entra identity or a secured gateway and enforce application authorization.
- Grant every tenant user subscription Contributor to ensure the function can read HR records.
- Enable CORS for the corporate domain and treat that as strong user authentication.
Explanation
Correct Answer
B:Require a valid identity token for the Function endpoint, validate issuer and intended audience, and implement appropriate role or claim checks for the requested record. Restrict network access where warranted and test unauthenticated and underprivileged calls. A function key is not the same as an employee's Entra identity. Validate a correctly authenticated employee and a user whose token is valid but lacks authority for a particular record.
Incorrect Answers
A:URLs can leak through logs, browsers or repositories. A secret-looking address is not verified user authentication or authorization for sensitive employee data. A leaked URL could permit another caller to invoke the anonymous Function and access sensitive records without identifying themselves.
C:Azure management privileges are overly broad and do not define which user may access employee application data. Enforce endpoint and business authorization. Contributor permits unrelated Azure resource operations and is not a fine-grained employee data access role for the API.
D:CORS is a browser interaction restriction; a nonbrowser client can call the same endpoint directly. Real token validation and authorization are necessary. A nonbrowser attacker is not constrained by the website's CORS policy and can send arbitrary HTTP requests directly.
Question 359
An Azure Function must read files from a storage service that allows only private endpoint access. Its public requests fail even though authentication is correct. What should be configured?
- Set the storage firewall to allow all Azure services without validating the Function's actual network path.
- Move the secret into a query string so private networking is bypassed.
- Use supported Function VNet integration, the storage private endpoint and correct private DNS routing for that plan.
- Assign the Function subscription Owner so Azure DNS permits the connection.
Explanation
Correct Answer
C:Verify the Function hosting plan supports the required integration and that the outbound path reaches the private storage subresource. Confirm hostname resolution from the Function environment, network rules and identity access. Test a real blob read after changes, keeping the public storage endpoint restricted as required. Test from the Function runtime itself because a developer workstation's private DNS path may differ from the hosting plan.
Incorrect Answers
A:Broad exceptions may not apply to arbitrary app traffic and can weaken isolation. The requirement is a supported private network path to the precise storage service. A broad firewall exception can create accidental public reachability while failing to account for the Function's real outbound network.
B:A credential in a URL risks leakage and cannot route a packet to an unreachable private endpoint. Network and authorization boundaries are separate. Credentials in URL strings can persist in server logs and still cannot make a public route follow private DNS.
D:Owner does not determine private DNS answers or routing. Excessive management privilege would not resolve the network failure. Azure Owner does not supply VNet integration capability or correct private endpoint resolution for the Function host.
Question 360
A Function currently reads a Key Vault secret from a plain environment variable inserted by the deployment script. Which refactor follows least privilege?
- Enable a system-assigned managed identity and supported Key Vault reference or secret retrieval with narrow vault authorization.
- Copy the secret into the Function source repository with a comment identifying its owner.
- Give the Function Managed Identity Global Administrator and disable the vault firewall.
- Use a static administrator password shared across all Functions for convenience.
Explanation
Correct Answer
A:Allow the Function identity to read only the needed secret, configure appropriate supported Key Vault reference or SDK access and verify any vault network restriction. Remove plaintext deployment copies and prevent secret values from appearing in function logs. Test renewal behavior so credential rotation does not require embedding a fresh key into source code. Test secret renewal after changing the vault value, and keep the effective identity and access policy under audit.
Incorrect Answers
B:Repository files can be cloned, scanned and retained in history. A comment does not protect the secret; use runtime identity-backed retrieval. Committed plaintext credentials remain accessible through repository clones and history even after a visible file is deleted.
C:Directory administration is unnecessary to read one vault secret, while opening network access creates additional exposure. Grant scoped data-plane permission only. Global Administrator is unnecessary for routine Key Vault data-plane reads and weakens tenant security if compromised.
D:Shared persistent credentials increase blast radius and complicate revocation. Per-workload identity reduces credential distribution and supports clearer audit trails. One shared static credential creates cross-application dependencies and makes incident revocation disruptive for unrelated Functions.