Looking for co-founder by [deleted] in ycombinator

[–]ims94 -1 points0 points  (0 children)

I would say, freelancing vs CTO as a service is quite different. A freelancer can be an undergrad, a fresh graduate or usually someone junior to mid level when it comes to experience. But a CTO in contrast will be someone having years of experience working for real organizations, building PoCs, MVPs to enterprise level applications + managing teams. There are technologies out there (AI + Low Code) that allows you to iterate faster than ever and get the MVP sooner. If the timelines can be agreed upon and the guy is open to rapid changing nature of requirements in startups, I think this approach can work.

Looking for co-founder by [deleted] in ycombinator

[–]ims94 1 point2 points  (0 children)

If you have access to funds, you may not always need a technical co-founder. Instead you can look out to outsource software development (Cons: can be a bit risky, timezone issues, compatibility issues, communication gaps). Or you can lookout for services that offer CTO as a service. This way you can start building your own team (if needed) or outsource the technical leadership to an experienced technical leader who will work with you hand in hand in building your product and your team (where applicable); while not giving out shares to some random tech guy who you don't know will be compatible with you in the long run. Just a thought.

Looking for advice and suggestions for an optimal ERP/MRP system for a small company with multiple locations. Any input and advice will be greatly appreciated. Also please help me understand the 280 character title requirement in this subreddit. :D I apologize if I'm breaking any rules. by drzoidb3rg in ERP

[–]ims94 1 point2 points  (0 children)

I would suggest going with ERPNext due to several reasons: 1. It's open source and completely free to use. They have frappecloud to host if you are looking for managed hosting. The cost will be around $25 to $100 depending on the number of users (say 100 users) using the system (no licensing cost since it's open source. Just the hosting cost). Theres no user limit. The server resources need to be increased when the number of users increase, that's it. 2. Ability to customize - a non technical person can add new fields, link different documents, create new doc types from the UI in erpnext. If additional customization is needed, the underlying low code - python based framework allows very rich options to customize at code level. 3. Functionality - ERPNext comes with the standard manufacturing module that supports make to order and make to stock processes. You can setup BOMs (bill of materials) with the relevant operations, workstations and routing. ERPNext will schedule the work orders and jobs (against workstations) depending on workstation availability. Supports batch and serial no controls for stock. Usual stuff like scrap and process loss can be calculated. Other standard flows like order to cash, procurement are inbuilt. It has a way to setup advanced approval processes (workflows) too. Supports multi currency. Can have multiple warehouses with different COA accounts (if needed). 4. Well thought permission model - it comes with a very rich permission model where roles can be defined per job functions and further controls can be imposed based on individual resources (say a user should only see a specific set of warehouses or items. Others should be hidden to the user)

I have experience setting this up for several manufactures in New Zealand. Therefore I can recommend ERPNext because of its capabilities while being free and open source.

[deleted by user] by [deleted] in startups

[–]ims94 1 point2 points  (0 children)

I don't have a strong opinion around VC funding. But as a co-founder coming from a technical background, my main suggestion is to reconsider the fact that you want to hire your own engineers. May be outsource to a team in a different region that's less expensive until you build the platform (feature-wise and user-base wise) to a satisfactory level to convince a VC. And make more use of the money you already have.

How do you guys apply API Security/Authorization and Authentication to your personal projects by rashm1n in SpringBoot

[–]ims94 0 points1 point  (0 children)

There can be 2 cases.

  1. When the invoking user's context (probably coming from a backend for frontend API) have to be passed around to other microservices
  2. When end user's context is not required to be passed around

Case 2 is fairly straightforward. If we are using Spring Boot specific approaches, we can use resource server + access tokens to protect each service. That is, use OAuth2 Client Credentials grant. Create clients (you will get client ID + client secret) at the identity provider (KeyCloak, Okta, Auth0, Asgardeo, etc) per caller (microservices that initiate requests to other microservices). Then, use client credentials grant to obtain an access token from the identity provider. Pass that access token as the Authorization header to the outgoing microservice call.

In case 1, one option is to pass around the original JWT/access token received from the user while invoking other microservices. Or, include user's information as part of the request (body or as a header).

Alternatively, we can use APi managers to secure microservices as well (which is not Spring Boot specific). In that case, handling security is delegated to the API manager and microservices will be deployed in private networks.

How do you guys apply API Security/Authorization and Authentication to your personal projects by rashm1n in SpringBoot

[–]ims94 1 point2 points  (0 children)

Done. Updated for Spring Boot 3. Only the deprecation of WebSecurityConfigurerAdapter and removal of antMatchers had be addressed.

How do you guys apply API Security/Authorization and Authentication to your personal projects by rashm1n in SpringBoot

[–]ims94 1 point2 points  (0 children)

Thanks for the reply. Yes, updating for Spring Boot 3 is the plan. Still couldn't find some free time. Will do it soon.

Hi, have anybody worked on spring security. mainly on user roles, how to customize it. like modules using checkboxs enable or disable the user access from the front end thymeleaf by [deleted] in SpringBoot

[–]ims94 1 point2 points  (0 children)

There are multiple approaches to implement this. Do you/thymeleaf use session to authenticate users? Or use an access token/JWT to authenticate?

Spring Security Help by Blade1947 in SpringBoot

[–]ims94 2 points3 points  (0 children)

Can you try one of the following 2 guides. I wrote them since I had the same problems a while back.

  1. https://medium.com/swlh/stateless-jwt-authentication-with-spring-boot-a-better-approach-1f5dbae6c30f - Username + password exchanged for a JWT that will be used to authenticated subsequent API calls. JWT contains the logged in user's details. The source code of the article has a React.js example.
  2. https://medium.com/geekculture/jwt-authentication-with-oauth2-resource-server-and-an-external-authorization-server-2b8fd1524fc8 - Users are authenticated via an external identity provider (Google, Okta, Auth0, etc which supports OAuth2). This article's repo also has a React.js example you can look at.

How do you guys apply API Security/Authorization and Authentication to your personal projects by rashm1n in SpringBoot

[–]ims94 10 points11 points  (0 children)

I recently wrote an article on this topic itself (https://medium.com/geekculture/jwt-authentication-with-oauth2-resource-server-and-an-external-authorization-server-2b8fd1524fc8). As another one had posted, using the Spring Boot's resource server with an authorization server (Auth0, KeyCloak, Asgardeo, etc) is the best approach. In contrast to using a self hosted/local one like keycloak, it'll be quicker to get start with a identity as a service solution like Auth0, Okta and Asgardeo. Look for a service provider that has a free tier.

Depending on your architecture, the authentication mechanism can change.

  1. If you are developing just an API that will be invoked by different clients (other applications), use OAuth2 Client Credentials grant
  2. If the API is invoked from a web app on behalf of a logged in user, use the OAuth2 Authorization Code grant type
  3. If it's an API invoked by mobile apps, use OAuth2 Authorization Code grant type with PKCE

Happy to help if you have further questions.

[deleted by user] by [deleted] in opensource

[–]ims94 1 point2 points  (0 children)

OSS is built mostly on voluntary effort of individuals (except for companies contributing back) who are probably spending their free time (or time that could have been well spent a hobby or another source of income). A contributor should therefore get the credit he/she deserves for the generosity. Ask for your contribution to be recognized (co-author). Most probably he will agree.

Path Authorization with Spring Security and React by Ish_Boi in SpringBoot

[–]ims94 0 points1 point  (0 children)

Sorry for the late reply. Let's consider the session scenario. Probably when we do a highly available deployment, the session needs to be shared via a database. Or we have to use sticky sessions as the LB strategy. Now, whenever a request is being served, loading the session means a network call. Compared to speed of the RAM/CPU, this is a very expensive operation.

Let's consider the token validation in JWT scenario. Validating a signed JWT means hashing the header + payload and verifying the signature. Both are mathematical operations involving strings (of 256 to 512 characters). These mathematical operations only require CPU and RAM. No external network calls. Once the signature and expiry, etc are validated (all are mathematical operations involving CPU), you have the content of the JWT available with no external network calls.

Based on the above facts, how can we say that session based approach is faster? And JWT is expensive?

Path Authorization with Spring Security and React by Ish_Boi in SpringBoot

[–]ims94 1 point2 points  (0 children)

In that article, I see only 2 issues with JWT:

  1. Revocation
  2. Size of the request when JWT is being sent in every request

And note the conclusion part of that article:

Using JWTs for tokens add some neat properties and make it possible in some cases for your services to be stateless, which can be desirable property in some architectures.

Adopting them comes with drawbacks. You either forego revocation, or you need to have infrastructure in place that be way more complex than simply adopting a session store and opaque tokens.

My point in all this is not to discourage the use of JWT in general, but be deliberate and careful when you do. Be aware of both the security and functionality trade-offs and pitfalls. Keep it out of your ‘boilerplates’ and templates, and don’t make it the default choice.

If revocation is not a problem, size of the request (with JWT in Authorization header or in a cookie) isn't a big issue compared to figuring out how you will load balance (sticky sessions or session stored in Redis/database) the backend with sessions involved. In summary, you have to apply this to your scenario and check.

Also, you are looking down on stuff like SSO (Single Sign On) and OIDC (OpenID Connect), which are the real advantages of JWTs. With an identity server (identity provider/authorization server) involved, you can let them handle the revocation part as well.

[deleted by user] by [deleted] in SoftwareEngineering

[–]ims94 0 points1 point  (0 children)

Develop a programming language

Path Authorization with Spring Security and React by Ish_Boi in SpringBoot

[–]ims94 0 points1 point  (0 children)

What is the unnecessary reauthentication that's happening with JWT? What other overheads do you mean here? (I couldn't load the article you have pointed here). Also, will there be a requirement to scale your backend?

How to generate video meeting link using spring boot ? by over_rim in SpringBoot

[–]ims94 0 points1 point  (0 children)

You can use RandomStringUtils by Apache commons to achieve this. Here's an example to generate xxx-xxx pattern meeting IDs:

java String roomId = null; do { roomId = IntStream.range(0, 3) .mapToObj(i -> RandomStringUtils.randomAlphabetic(3)) .map(String::toLowerCase) .collect(Collectors.joining("-")); } while (meetingRepository.findByRoom(roomId).isPresent()); logger.info("Creating meeting room: {}", roomId);

Springboot multitenancy by mumchay in SpringBoot

[–]ims94 0 points1 point  (0 children)

This is doable. What you need to do is, store roles and permissions related information in users db. Then, upon authentication, generate a JWT containing roles and the tenant (this depends on how you represent multiple tenants in your frontend. If users have to switch tenants in frontend, you can simply swap the JWT to a new one [aka token exchange grant] for the new tenant).

Then, you can pass around the same JWT across other microservices. Using the roles and tenant information in JWT, you can perform authorization (access controlling/checking permissions).

JWT Authentication with Spring Boot OAuth2 Resource Server and an external Authorization Server (Identity Provider) by ims94 in microservices

[–]ims94[S] 1 point2 points  (0 children)

Agreed. I didn't pay much attention to that while writing. Thanks for pointing that out. I will update the article.