Skip to content

Conversation

@devpro
Copy link
Owner

@devpro devpro commented Jul 13, 2025

Features

  • State lock/unlock features
  • Integration tests with 60% of code coverage
  • NuGet package upgrade
  • Basic sample
  • Pipeline upgrade
  • Secured container image (with SUSE BCI)
  • CONTRIBUTING file
  • User repository with password hash

@devpro devpro changed the title Feature/Fix GitHub Actions (pipelines) Feature/Develop MVP Jul 14, 2025
@devpro devpro changed the title Feature/Develop MVP Feature/Develop MVP July 2025 Jul 14, 2025
@jjkola
Copy link
Contributor

jjkola commented Jul 14, 2025

I would prefer that the branch is kept reasonably small. I wanted to contribute a basic implementation for user management but now I don't know when/if I should do that (was waiting for the PR to close so that I have a stable code base to work on). Nevertheless this your project and you are free to do whatever you want.

@devpro
Copy link
Owner Author

devpro commented Jul 15, 2025

I would prefer that the branch is kept reasonably small. I wanted to contribute a basic implementation for user management but now I don't know when/if I should do that (was waiting for the PR to close so that I have a stable code base to work on). Nevertheless this your project and you are free to do whatever you want.

Understood. This is an unusual "big" PR as there are many changes that I wanted to deliver quickly. It will be merged tomorrow. Sorry for the delay. I will be interested to have your inputs/contributions. Hope you'll appreciate the new changes. I really believe in this project, didn't have the time to work on it before.

@sonarqubecloud
Copy link

@devpro devpro merged commit be7d910 into main Jul 16, 2025
4 checks passed
@devpro devpro deleted the feature/pipeline-fix branch July 16, 2025 21:25
}

return app;
app.UseHttpsRedirection();
Copy link
Contributor

@jjkola jjkola Jul 17, 2025

Choose a reason for hiding this comment

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

@devpro This may lead to hard to debug issues as the HTTPS redirection may and will cause required headers to be stripped. Users may be left with the impression that issue is with credentials when the real issue is configuration issue. Also, this may not work with non-standard ports out of the box. Microsoft recommends using HTTPS redirection only with normal websites and advises against it with API sites. The recommended action is not listening at all to HTTP port, or alternatively reacting with HTTP status code 400 (Bad Request).

Also, in some cases users may not have HTTPS available. For example, I will have the certificate system available after I will be able to setup TF and bring up a server which will handle certificates. And, yes I could hack something, but I would like to rather make it work correctly the first time.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the noise, I didn't realize that you had just changed the file to use scoped namespace. But, still, the issues mentioned in my previous comment are valid (if you take out the original thought that redirection is always forced, and thus being configurable).

/// <param name="tenant"></param>
/// <param name="name">The name of the Terraform state</param>
/// <returns>Raw string</returns>
[HttpGet("{name:regex([[a-zA-Z]]+)}", Name = "GetState")]
Copy link
Contributor

@jjkola jjkola Jul 17, 2025

Choose a reason for hiding this comment

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

@devpro Why only a-z (and their uppercase variants)? Wouldn't it be better to use a typed value which will be checked within the type. This will make it testable and most likely more performant as there is no guarantee how many times this regex is created when in the case of typed value it needs to be instantiated only once during the lifetime.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I didn't find another solution but happy to change.
Problem was to differenciate the calls between {state} and {state}/lock (POST/DELETE).

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.

3 participants