Open Charlotte-Holt opened 4 years ago
Peer review of draft at https://draft-openlibertyio.mybluemix.net/docs/ref/general/#securing%20cloud%20native%20microservices.html
here's a KC topic that might be helpful- https://www.ibm.com/support/knowledgecenter/SSD28V_liberty/com.ibm.websphere.wlp.core.doc/ae/rwlp_sec_quick_overview.html?pos=2
External security providers also save the application developers and administrators of the effort of managing user accounts.
there's an extra "of" before "the effort"Link each of the features you list to their entry in the gen doc
@ManasiGandhi Peer review: Adding to the comments that you've already addressed in the PR here: https://github.com/OpenLiberty/docs/pull/982
Notes: We've concluded that the topic should be a broader topic than what was originally dscribed at the beginning of this topic. David, Mansi, and I came up with the following list of security ideas for the topic. Manasi can use them as a starting point to discuss the contents of the topic with Ajay and Alasdair.
The topic, including additions/subtractions to the list should explain the importance of these areas of security and then the basics of how to implement them in an Open Liberty enviroment, with links to the more detailed topics.
Some small comments below but I think there needs to be a lot more info in this topic. However, I don't know what just yet. I think it might be better to come back to this when we have a full set of security docs together we can review so I'm going to spend time reviewing the other topics then I'll come back to this, if that's okay. Just put this on hold for a little while while we pull the other security topics together.
@lauracowen Here's a link to the draft https://draft-openlibertyio.mybluemix.net/docs/ref/general/#securing-cloud-native-microservices.html . It is an initial draft with an outline that I need to check for accuracy.
Thanks. I think we have largely the right tech areas covered here but I think it needs to be shorter and more focused. I know we didn't have the purpose of this topic very clear so it's good to have this draft to start from. I'll try to describe what the aims are below and then suggest an outline to refocus/restructure the information.
Audience The audience of this topic is, specifically, application developers. As a developer, when you're writing an application, it's really easy to disregard security until you really have to do it, and then only what you really have to do. The importance of security is generally seen by the operations people (or more senior people in the org), not developers, because it's the operations people who have to keep the app up and running and not have bad people break into the organisation. Unless the developer is also doing the production-time ops for their app, while they may care, they probably don't know a lot about security, and it's not their greatest priority to learn or spend time on (there are other things that they need to spend time on).
Aim/purpose of this topic This topic needs to help the developer know what they must do to secure their app without them having to take loads of time learning everything there is to know about security. The aim is not to be an overview of all the security topics we have. I don't know if you've seen the draft of the navigation for the OL docs? https://antora.mybluemix.net/docs/latest/overview.html You'll see there's a Development section and a Security section. Most of the security information is in the Security section. However, this topic will be moved to the Development section when it's written. This will probably be the only security-related topic in the Development section, though it will have links to the other security topics for if the developer wants to know more. However, this topic needs to be sufficient for most developers to know what they need to do in order to secure their app, even if they need to look elsewhere for the specific details of some parts of that process. Think about presenting it so that it's useful and practical, rather than a wall of text, so that it leads the developer easily through the considerations they need to make but without overwhelming them with information. Avoid duplicating info that's elsewhere. Just keep it brief here.
Outline
Can you delete the additional "Securing cloud-native microservices" topic from the draft website? I think it's the old version but it has a different file name so it's there as well.
This is a reasonable start. I like the structure of separating out development from production. But the text itself very sparse and really just a list of links in paragraph form once you get to the production section. Don't focus on providing links to every topic (that's not the purpose of this topic); focus instead on providing useful information (whatever links that requires will be obvious as a consequence of doing that).
I know I said to keep it brief but it needs to be more helpful and to speak to the developer as if we understand their situation. Be wordy and helpful for now - don't worry about being brief - I wrote the outline above for a reason - you don't need to just extract the bare, dry facts from it - explain things in a way the developer can relate to. We can edit it down later if it gets a bit long. Explain things like you would if you were talking to someone in person.
There need to be examples and it really needs some illustration to visually show what's needed (as I described above). The banking example I gave may not be the best idea but we need something (and we have other examples elsewhere if banking is not the best approach).
"When users try to access your application you need to verify if the users are what they claim to be." -> "... who they claim to be." - you can't tell what they are, just who they are.
There are a couple of dodgy links displaying in this topic. Can you check the topic over after it's built before putting it to review to make sure you catch build problems before the reviewers see it?
Not sure why the "hardening" link targets the TLS topic? Was that meant to target one of Charlotte's hardening topics instead?
@lauracowen I worked on your comments. I've pasted an initial diagram for your reference.
[x] There need to be examples and it really needs some illustration to visually show what's needed (as I described above). The banking example I gave may not be the best idea but we need something (and we have other examples elsewhere if banking is not the best approach).
[x] "When users try to access your application you need to verify if the users are what they claim to be." -> "... who they claim to be." - you can't tell what they are, just who they are.
[x] There are a couple of dodgy links displaying in this topic. Can you check the topic over after it's built before putting it to review to make sure you catch build problems before the reviewers see it?
[ ] Not sure why the "hardening" link targets the TLS topic? Was that meant to target one of Charlotte's hardening topics instead?
@lauracowen I worked on your review. Here is the link to the draft https://draft-openlibertyio.mybluemix.net/docs/20.0.0.10/securing-cloud-native-microservices.html
[x] Can you move this topic into the Development section of the navigation instead of the Security section? This is the only security-related topic that will be in the Development section (all the other security-related topics are for more of an ops audience).
[x] First paragraph, I think "to prevent unauthorized access to your application" is the reason for the first sentence in that paragraph, not the reason for the second sentence. The reason why you should secure your app earlier rather than later is (and I can't think how to phrase this properly right now) so that it's possible to do it properly, so that you don't skip important steps just because your app is so far down the development lifecycle that there isn't time/resource/technical skill to make it secure, so that you don't end up writing an app that has to be practically re-written from scratch later in order to secure it sufficiently.
[x] Where you have the Auth/Authz definitions, they're good but they're a bit oddly sat in the middle of the topic - you need to briefly introduce them (imagine the reader hasn't seen the other security topics that we have written - this is to give the key bits of info they need, as a developer rather than an ops person in a way that makes sense for them), and/or make them part of the same paragraph. Actually, you've replicated these sentences in the paragraph afterwards so maybe you can remove the first mentions of them anyway?
[x] When you say "the user", could you be more explicit (at least on first mention) and really spell out who you mean eg "the end-user of your application". "the user" is so vague and can mean multiple people in even the same context. (I added "users of your application" as "end-user" is not allowed in the terminology)
[x] Thanks for adding an example scenario. Can you frame it more towards a developer writing an app now? The current description is a nice example but it is talking about a larger system (which is what an ops person would care about) not a specific app within that system (which is what a developer would care about). A simple one might be writing an app like Bluepages (a company employee directory) for their company and while anyone in the company (but not outside) can access the details of all employees, only the employee and their direct manager can edit an employees profile in it (hence requiring some different permissions for employees vs managers). And it'd use the employee's company intranet account details to authenticate them through SSO, etc. Get an SME to work with you on this though to make sure it's technically plausible, and make sure to keep it simple. (Worked with Teddy Torres on the example scenario)
[x] Diagram - thanks - can you take a look at the diagram in the Authentication topic and take that as a basis and then adapt it for this topic (so we have consistency) - probably just the same as that but annotate it in some way with where the weaknesses are that a developer should be concerned about securing when developing an app (not everything is within the control of a developer - eg as you know from your other topics, a developer might need to set up an OIDC provider for testing building JWTs whilst developing the app but that wouldn't be what is used to build JWTs in production). (link to the diagram https://ibm.enterprise.slack.com/files/WJ02BA266/F01ABQD1J9X/image.png)
Hi Manasi,
I just saw Karen's list of topics that you'd come up with as a team (sorry @chirp1 - not sure how I missed that before). I think maybe we can use some of that to give some more depth to this topic, so that it doesn't just become a list of links to other security topics.
Maybe frame the topic as providing best practice on how to design a secure application for a microservices architecture. Always from the developer's perspective (for this topic) though:
I think you'll need solid support from an SME to write this. Not necessarily someone from the security team if you can find someone with some experience at writing secure microservices. It might be worth arranging a chat with YK Chang for a first pass at what he'd consider important to mention. You could then find someone in the security team, maybe, to help write it.
I think the success of writing this topic will hinge largely on finding a good person (SME) to work with. And then ensuring that you can explain it clearly and well (regardless of how the SME expresses the info).
So you'll need to do some background research and self-learning (eg try doing the security-related guides but note that the JWT guide is about to be updated to something easier to read and more usable to follow - Charlotte might know when it's published as she edited it recently). Ideally, get some basic knowledge before talking to the SMEs so that you can put together a list of questions to ask them. The guides will probably explain or demonstrate some concepts relevant to the items on Karen's list above, which might help with both your understanding and what to ask SMEs.
This will be challenging (in a good way - and will give you a good knowledge basis that will generally be applicable across various IBM projects/products you might work on) so it might be something to work collaboratively on with another writer, at least at the start. It may be that it can provide a doc topic here but also the basis of a blog post or article on IBM Developer too in future.
I'm planning to work on this issue later based on a discussion during OL scrum.
From LC: This is a new concept topic for an introduction to securing microservices- authentication and authorization in securing cloud-native microservices. Jakarta EE Security provides the capability to configure the basic authentication, form authentication, or custom form authentication mechanism by using annotations in servlets.
Include basic concepts of authentication and authorization and provide a diagram and description of authorization/authentication (see the following list of KC topics for more information, but don't just transfer the long concept topics from the KC) in a microservices scenario (for example, a developer wants to view account page on a website and get prompted to log in).
Background information: https://www.ibm.com/cloud/garage/architectures/microservices/microservices-kubernetes-microprofile
Apps running on OL can be configured to use external security providers to handle authentication/authorization. This ensures that the app never directly accesses or stores the user's password. Using external security providers also relieves developers and administrators of the app of the effort of managing user accounts. Include information about Jakarta EE Security as it's relevant to these scenarios.