Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requests to /cloudfoundryapplication possibly return results for /actuator #1293

Open
TimHess opened this issue May 10, 2024 · 1 comment
Open
Labels
Component/Management Issues related to Steeltoe Management (actuators) ReleaseLine/4.x Identified as a feature/fix for the 4.x release line Type/bug Something isn't working
Milestone

Comments

@TimHess
Copy link
Member

TimHess commented May 10, 2024

Describe the bug

In CF context, only /health and /info are reported as being enabled

Sample response:

{
    "type": "steeltoe",
    "_links": {
        "info": {
            "href": "https://steeltoe-samples-server.apps.dhaka.cf-app.com/cloudfoundryapplication/info",
            "templated": false
        },
        "health": {
            "href": "https://steeltoe-samples-server.apps.dhaka.cf-app.com/cloudfoundryapplication/health",
            "templated": false
        },
        "self": {
            "href": "https://steeltoe-samples-server.apps.dhaka.cf-app.com/cloudfoundryapplication",
            "templated": false
        }
    }
}

Steps to reproduce

Steps to reproduce the behavior:

  1. Add Actuators to app
  2. Deploy to CF
  3. View app in apps manager

Expected behavior

All endpoints supported on Cloud Foundry should be returned/enabled automatically

Environment (please complete the following information):

  • Steeltoe Version main
  • Platform: Cloud Foundry
  • OS: Linux
  • .NET Version 8.0
@TimHess TimHess added Type/bug Something isn't working Component/Management Issues related to Steeltoe Management (actuators) ReleaseLine/4.x Identified as a feature/fix for the 4.x release line labels May 10, 2024
@TimHess TimHess added this to the 4.0.0-m1 milestone May 10, 2024
@TimHess
Copy link
Member Author

TimHess commented May 29, 2024

Probably related:

2024-05-29T13:57:16.458-05:00 [APP/PROC/WEB/0] [OUT] IDX10242: Security token: '[Security Artifact of type 'Microsoft.IdentityModel.JsonWebTokens.JsonWebToken' is hidden. For more details, see https://aka.ms/IdentityModel/SecurityArtifactLogging.]' has a valid signature.
2024-05-29T13:57:16.459-05:00 [APP/PROC/WEB/0] [OUT] IDX10239: Lifetime of the token is valid.
2024-05-29T13:57:16.459-05:00 [APP/PROC/WEB/0] [OUT] IDX10214: Audience validation failed. Audiences: 'cloud_controller, actuator, apps_manager_js'. Did not match: validationParameters.ValidAudience: 'null' or validationParameters.ValidAudiences: 'sampleapi, 4e6f8e34-f42b-440e-a042-f2b13c1d5bed'.
2024-05-29T13:57:16.459-05:00 [APP/PROC/WEB/0] [OUT] info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[1]
2024-05-29T13:57:16.459-05:00 [APP/PROC/WEB/0] [OUT] Failed to validate the token.
2024-05-29T13:57:16.459-05:00 [APP/PROC/WEB/0] [OUT] Microsoft.IdentityModel.Tokens.SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'cloud_controller, actuator, apps_manager_js'. Did not match: validationParameters.ValidAudience: 'null' or validationParameters.ValidAudiences: 'sampleapi, 4e6f8e34-f42b-440e-a042-f2b13c1d5bed'.
2024-05-29T13:57:16.459-05:00 [APP/PROC/WEB/0] [OUT] at Microsoft.IdentityModel.Tokens.Validators.ValidateAudience(IEnumerable`1 audiences, SecurityToken securityToken, TokenValidationParameters validationParameters)
2024-05-29T13:57:16.459-05:00 [APP/PROC/WEB/0] [OUT] at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateTokenPayloadAsync(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-05-29T13:57:16.459-05:00 [APP/PROC/WEB/0] [OUT] at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.ValidateJWSAsync(JsonWebToken jsonWebToken, TokenValidationParameters validationParameters, BaseConfiguration configuration)
2024-05-29T13:57:16.459-05:00 [APP/PROC/WEB/0] [OUT] info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[7]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component/Management Issues related to Steeltoe Management (actuators) ReleaseLine/4.x Identified as a feature/fix for the 4.x release line Type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant