How to secure REST API payload while in transit?












2















I am trying to find out ways to secure REST API communication. The following are the items considered.




  • Enabled token based authentication using JWT

  • Enabled HTTPS and restrict requests over HTTP


Our GUI interacts with service layer APIs which are secured as described above. All the requests from GUI contains sensitive information and hence the data has to be secured at every place.



In short, our GUI is secured with role based authentication and APIs are secured as above. Still I feel the communication between GUI and services are not secure enough.




  • Is the payload from GUI secure enough? or should the payload also be encrypted from GUI itself?


If this is not the right place to ask this question, I am happy to move it to right place.



Please advice!
Thank you in advance










share|improve this question

























  • What kind of data is it? Is it PII? HIPAA? FOUO? Classified? Or just ordinary traffic?

    – Robert Harvey
    Nov 21 '18 at 4:37













  • Hi Robert, the data contais usernames, passwords and/or api tokens including server details to interact. Thanks!

    – ac184
    Nov 21 '18 at 4:50
















2















I am trying to find out ways to secure REST API communication. The following are the items considered.




  • Enabled token based authentication using JWT

  • Enabled HTTPS and restrict requests over HTTP


Our GUI interacts with service layer APIs which are secured as described above. All the requests from GUI contains sensitive information and hence the data has to be secured at every place.



In short, our GUI is secured with role based authentication and APIs are secured as above. Still I feel the communication between GUI and services are not secure enough.




  • Is the payload from GUI secure enough? or should the payload also be encrypted from GUI itself?


If this is not the right place to ask this question, I am happy to move it to right place.



Please advice!
Thank you in advance










share|improve this question

























  • What kind of data is it? Is it PII? HIPAA? FOUO? Classified? Or just ordinary traffic?

    – Robert Harvey
    Nov 21 '18 at 4:37













  • Hi Robert, the data contais usernames, passwords and/or api tokens including server details to interact. Thanks!

    – ac184
    Nov 21 '18 at 4:50














2












2








2








I am trying to find out ways to secure REST API communication. The following are the items considered.




  • Enabled token based authentication using JWT

  • Enabled HTTPS and restrict requests over HTTP


Our GUI interacts with service layer APIs which are secured as described above. All the requests from GUI contains sensitive information and hence the data has to be secured at every place.



In short, our GUI is secured with role based authentication and APIs are secured as above. Still I feel the communication between GUI and services are not secure enough.




  • Is the payload from GUI secure enough? or should the payload also be encrypted from GUI itself?


If this is not the right place to ask this question, I am happy to move it to right place.



Please advice!
Thank you in advance










share|improve this question
















I am trying to find out ways to secure REST API communication. The following are the items considered.




  • Enabled token based authentication using JWT

  • Enabled HTTPS and restrict requests over HTTP


Our GUI interacts with service layer APIs which are secured as described above. All the requests from GUI contains sensitive information and hence the data has to be secured at every place.



In short, our GUI is secured with role based authentication and APIs are secured as above. Still I feel the communication between GUI and services are not secure enough.




  • Is the payload from GUI secure enough? or should the payload also be encrypted from GUI itself?


If this is not the right place to ask this question, I am happy to move it to right place.



Please advice!
Thank you in advance







python angularjs rest security encryption






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 '18 at 4:46









Ayush Gupta

3,1381843




3,1381843










asked Nov 21 '18 at 4:35









ac184ac184

9219




9219













  • What kind of data is it? Is it PII? HIPAA? FOUO? Classified? Or just ordinary traffic?

    – Robert Harvey
    Nov 21 '18 at 4:37













  • Hi Robert, the data contais usernames, passwords and/or api tokens including server details to interact. Thanks!

    – ac184
    Nov 21 '18 at 4:50



















  • What kind of data is it? Is it PII? HIPAA? FOUO? Classified? Or just ordinary traffic?

    – Robert Harvey
    Nov 21 '18 at 4:37













  • Hi Robert, the data contais usernames, passwords and/or api tokens including server details to interact. Thanks!

    – ac184
    Nov 21 '18 at 4:50

















What kind of data is it? Is it PII? HIPAA? FOUO? Classified? Or just ordinary traffic?

– Robert Harvey
Nov 21 '18 at 4:37







What kind of data is it? Is it PII? HIPAA? FOUO? Classified? Or just ordinary traffic?

– Robert Harvey
Nov 21 '18 at 4:37















Hi Robert, the data contais usernames, passwords and/or api tokens including server details to interact. Thanks!

– ac184
Nov 21 '18 at 4:50





Hi Robert, the data contais usernames, passwords and/or api tokens including server details to interact. Thanks!

– ac184
Nov 21 '18 at 4:50












1 Answer
1






active

oldest

votes


















1














What I understood from the post is that your GUI is secured role based and the api is secured using token and https.



Apart from these, as I understand you app is too sensitive, in that case I would do the following to add some extra layer of security.




  1. Add a two step verfication for the GUI just to ensure that right person is logged in all time.


  2. Encrypt the data (i.e. the payload) may be using the public/private key.In this case the server side needs to be changed a bit as it needs to decrypt the request .


  3. Make sure your token has a lifetime and expires after certain time.



Let me know if you are looking for something else.






share|improve this answer
























  • That is what i am thinking too. REST API communication is open. Having encryption at client side and handle at server side helps. Thank you !

    – ac184
    Nov 21 '18 at 5:04






  • 2





    Encrypting the payload is pointless if you're using HTTPS.

    – Luke Joshua Park
    Nov 21 '18 at 5:26











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53405327%2fhow-to-secure-rest-api-payload-while-in-transit%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














What I understood from the post is that your GUI is secured role based and the api is secured using token and https.



Apart from these, as I understand you app is too sensitive, in that case I would do the following to add some extra layer of security.




  1. Add a two step verfication for the GUI just to ensure that right person is logged in all time.


  2. Encrypt the data (i.e. the payload) may be using the public/private key.In this case the server side needs to be changed a bit as it needs to decrypt the request .


  3. Make sure your token has a lifetime and expires after certain time.



Let me know if you are looking for something else.






share|improve this answer
























  • That is what i am thinking too. REST API communication is open. Having encryption at client side and handle at server side helps. Thank you !

    – ac184
    Nov 21 '18 at 5:04






  • 2





    Encrypting the payload is pointless if you're using HTTPS.

    – Luke Joshua Park
    Nov 21 '18 at 5:26
















1














What I understood from the post is that your GUI is secured role based and the api is secured using token and https.



Apart from these, as I understand you app is too sensitive, in that case I would do the following to add some extra layer of security.




  1. Add a two step verfication for the GUI just to ensure that right person is logged in all time.


  2. Encrypt the data (i.e. the payload) may be using the public/private key.In this case the server side needs to be changed a bit as it needs to decrypt the request .


  3. Make sure your token has a lifetime and expires after certain time.



Let me know if you are looking for something else.






share|improve this answer
























  • That is what i am thinking too. REST API communication is open. Having encryption at client side and handle at server side helps. Thank you !

    – ac184
    Nov 21 '18 at 5:04






  • 2





    Encrypting the payload is pointless if you're using HTTPS.

    – Luke Joshua Park
    Nov 21 '18 at 5:26














1












1








1







What I understood from the post is that your GUI is secured role based and the api is secured using token and https.



Apart from these, as I understand you app is too sensitive, in that case I would do the following to add some extra layer of security.




  1. Add a two step verfication for the GUI just to ensure that right person is logged in all time.


  2. Encrypt the data (i.e. the payload) may be using the public/private key.In this case the server side needs to be changed a bit as it needs to decrypt the request .


  3. Make sure your token has a lifetime and expires after certain time.



Let me know if you are looking for something else.






share|improve this answer













What I understood from the post is that your GUI is secured role based and the api is secured using token and https.



Apart from these, as I understand you app is too sensitive, in that case I would do the following to add some extra layer of security.




  1. Add a two step verfication for the GUI just to ensure that right person is logged in all time.


  2. Encrypt the data (i.e. the payload) may be using the public/private key.In this case the server side needs to be changed a bit as it needs to decrypt the request .


  3. Make sure your token has a lifetime and expires after certain time.



Let me know if you are looking for something else.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 21 '18 at 4:53









tendstoZerotendstoZero

983




983













  • That is what i am thinking too. REST API communication is open. Having encryption at client side and handle at server side helps. Thank you !

    – ac184
    Nov 21 '18 at 5:04






  • 2





    Encrypting the payload is pointless if you're using HTTPS.

    – Luke Joshua Park
    Nov 21 '18 at 5:26



















  • That is what i am thinking too. REST API communication is open. Having encryption at client side and handle at server side helps. Thank you !

    – ac184
    Nov 21 '18 at 5:04






  • 2





    Encrypting the payload is pointless if you're using HTTPS.

    – Luke Joshua Park
    Nov 21 '18 at 5:26

















That is what i am thinking too. REST API communication is open. Having encryption at client side and handle at server side helps. Thank you !

– ac184
Nov 21 '18 at 5:04





That is what i am thinking too. REST API communication is open. Having encryption at client side and handle at server side helps. Thank you !

– ac184
Nov 21 '18 at 5:04




2




2





Encrypting the payload is pointless if you're using HTTPS.

– Luke Joshua Park
Nov 21 '18 at 5:26





Encrypting the payload is pointless if you're using HTTPS.

– Luke Joshua Park
Nov 21 '18 at 5:26




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53405327%2fhow-to-secure-rest-api-payload-while-in-transit%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?