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

fix: Hello world action exposed to the internet in code first archetypes #1920

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

aludwiko
Copy link
Contributor

No description provided.

@aludwiko aludwiko requested a review from ennru December 15, 2023 09:32
@github-actions github-actions bot added java-sdk-protobuf kalix-runtime Runtime and SDKs sub-team labels Dec 15, 2023
@@ -24,7 +24,7 @@
<dockerImage>${D}{kalixContainerRegistry}/${D}{kalixOrganization}/${D}{project.artifactId}</dockerImage>
<dockerTag>${project.version}-${build.timestamp}</dockerTag>
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
<mainClass>${package}.Main</mainClass>
<mainClass>${package}.MainKt</mainClass>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not a Kotling expert, but without this, the mvn kalix:runAll command doesn't work.

Comment on lines 8 to 12
@RequestMapping
/**
* This is a simple Action that returns "Hello World!" and it's exposed to the Internet.
* Locally, you can access it by running `curl http://localhost:9000/hello`.
*/
Copy link
Member

Choose a reason for hiding this comment

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

Is it intentional to have the annotation before the class comment?
Look non-standard to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I saw the same in the main class:

@SpringBootApplication
// Allow all other Kalix services deployed in the same project to access the components of this
// Kalix service, but disallow access from the internet. This can be overridden explicitly
// per component or method using annotations.
// Documentation at https://docs.kalix.io/services/using-acls.html
@Acl(allow = @Acl.Matcher(service = "*"))
public class Main {

  private static final Logger logger = LoggerFactory.getLogger(Main.class);

  public static void main(String[] args) {
    logger.info("Starting Kalix Application");
    SpringApplication.run(Main.class, args);
  }
}

Copy link
Member

Choose a reason for hiding this comment

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

This is different.

The following is a javadoc.

/**
 *
 */

While the comment in the Main.class is a comment about the Acl annotation that is just under it.

Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

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

LGTM.

@ennru ennru merged commit f3cd530 into main Dec 15, 2023
68 checks passed
@ennru ennru deleted the hello-world-action branch December 15, 2023 10:17
aklikic pushed a commit to aklikic/kalix-jvm-sdk that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java-sdk-protobuf kalix-runtime Runtime and SDKs sub-team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants