4

I am curious about what options I have for securing a service connecting (registering and getting disco info) to eureka. Obviously I want to turn security on in Eureka and specify a username password for service.

One question that I have is how do services trying to connect to eureka specify their credentials? Is it through the specification of the zone and what is the format of this reference?

*** I actually the answer to the above question and posted below, But still wonder about the following

As well, can I specify more strenuous security mechanisms and if so, which and how?

1 Answer 1

11

Ok, turns out that after you post an question is when suddenly you discover a way of doing.

I have figured out the part of my question:

in the Eureka server put this

security:
  basic:
    enabled: true
  user:
      name: user # login username
      password: password

In you service then put this

eureka:
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://user:password@localhost:8761/eureka/

After this services are authenticating to Eureka nd Eureka will reject any service without these credentials.

So Now to the second part of my question. What other ways can I secure this connection that are more secure?

5
  • 3
    What are your concerns with that? Do you have a suggestion for something that is "more secure"?
    – Dave Syer
    Mar 11, 2015 at 9:30
  • I guess a application.yml with a use/password is probably ok for most instances. I was wondering what other ways I could secure this besides this? Mar 11, 2015 at 18:14
  • Upvoted. BTW, how did you find these properties? I see something else in the documentation. I'm wondering how could I specify them separately without embedding in the URL? Oct 24, 2015 at 2:16
  • @AbhijitSarkar you canfind these properties here: docs.spring.io/spring-boot/docs/current/reference/html/…
    – csviri
    Aug 16, 2016 at 11:14
  • 1
    The used protocol is HTTP which can be eavesdropped, you should use HTTPS. Dec 8, 2016 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.