by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 01 03:04

    greenlaw110 on 1.8

    update fastjson to 1.2.70 - sec… (compare)

  • Jun 01 03:04

    greenlaw110 on 1.8

    update fastjson to 1.2.70 - sec… (compare)

  • May 31 12:38

    greenlaw110 on 1.8

    FastJSON vulnerability fix (compare)

  • May 31 12:38

    greenlaw110 on 1.8

    FastJSON vulnerability fix (compare)

  • May 28 22:43

    greenlaw110 on test-engine

    #1339 teardown test engines onc… (compare)

  • May 28 22:43

    greenlaw110 on test-engine

    #1339 teardown test engines onc… (compare)

  • May 28 22:27
    greenlaw110 edited #1339
  • May 28 22:27
    greenlaw110 edited #1339
  • May 28 22:26
    greenlaw110 milestoned #1339
  • May 28 22:26
    greenlaw110 labeled #1339
  • May 28 22:26
    greenlaw110 milestoned #1339
  • May 28 22:26
    greenlaw110 labeled #1339
  • May 28 22:26
    greenlaw110 assigned #1339
  • May 28 22:26
    greenlaw110 assigned #1339
  • May 28 22:26
    greenlaw110 opened #1339
  • May 28 22:26
    greenlaw110 opened #1339
  • May 24 21:07

    greenlaw110 on test-engine

    update version tag Scenario manager - support load… automatically set test engine t… (compare)

  • May 24 21:07

    greenlaw110 on test-engine

    update version tag Scenario manager - support load… automatically set test engine t… (compare)

  • May 24 21:06
    greenlaw110 milestoned #1338
  • May 24 21:06
    greenlaw110 milestoned #1338
Green Luo
@greenlaw110
@DeveloperClaus
I am not sure why context.isLoggedIn() returns false. Here is the source code:
image.png
with regarding to act-aaa exceptions. Can you please create a github issue?
DeveloperClaus
@DeveloperClaus

I created issue actframework/actframework#1324

About context.isLoggedIn() and session.get("username") I was mistaken. Both do not work. I looks like my complete context and session is lost with the next call. That ist verified in the sense, that other stuff is not there either, e.g. cacheFor30Min. I will try to make a simple example and post it here. Probably some configuration for that is missing?

Green Luo
@greenlaw110
@DeveloperClaus if you do have loggedIn in "this" request , and lost the username in the next request, please check into the following two cases:
  1. If you are running app in prod mode but not on https. => please set 'http.secure=false' explictly in your app config properties
  2. If you are using a pure front end app (react/angular/...), check if you have passed in correct Authorization token
@DeveloperClaus can you please do me a favor to move actframework/actframework#1324 to https://github.com/actframework/act-aaa-plugin/issues
DeveloperClaus
@DeveloperClaus
@greenlaw110 moved to actframework/act-aaa-plugin#43
Green Luo
@greenlaw110
Thanks @DeveloperClaus. Did you figure out the issue with context.isLoggedIn()?
DeveloperClaus
@DeveloperClaus
Hi @greenlaw110 . Thanx for asking. No, I haven't. But (locally) I prepared a very nice example. Guess with that one you can see quite fast where I made the mistake. I will publish it to github so you can have a look.
DeveloperClaus
@DeveloperClaus
So, here is my example: https://github.com/DeveloperClaus/bookmark
It would be nice of you to have a look at it. Not sure where my mistake is, but I'm really having a hard time and I have the feeling I'm not making any progress. So even if you think this is easy, any help would be appreciated.
Green Luo
@greenlaw110
@DeveloperClaus in your code the application is setup as a pure backend service, which means the app is communicating with UI project using Authorization Bear token
image.png
There is no cookie setup at all. Unfortunately, your test pages are relying on cookie to communicate with server on user sessions (Certaintly it doesn't capture the Authorization header from response and then prepare Authorization header in the request)
Green Luo
@greenlaw110
When I changed your app.properties file to:
image.png
I can actually have context.isLoggedIn() be true after resolved the session from cookie:
image.png
Unfortunately, you have act-aaa-plugin installed and it will try to fetch the current user from the logged in username testFlowUser, and it failed to get it done:
image.png
I checked your acl.yaml file and found you have an entity testFlowUser defined inside, however the type of the entity is role not user:
image.png
Green Luo
@greenlaw110
I tried to change it from role to principal:
image.png
But found the default ActAAAService does not provide any implementation for saving the principal:
image.png
Therefore when I start the app, I got the following error stacktrace:
image.png
Green Luo
@greenlaw110
Now I hit the login link and got this error:
image.png
The console log for the error is:
image.png
Finally I found you have this line of code defined in User's constructor:
image.png
You tried to grant a role to the user, however the role object is not defined in acl.yaml file:
Then I added the role corresponding to AAAHelper.ROLE_USER into the acl.yaml file:
image.png
Finally we can get the check page working as expected:
image.png
Green Luo
@greenlaw110
I have committed my changes and submit a PR to you @DeveloperClaus
image.png
Here is the missing message which is about fixing the missing initial user(principal) issue:
image.png
DeveloperClaus
@DeveloperClaus
Thanks for helping me with that! This example is now working as expected, and I learned a lot of things. My original example does not work yet, but that doesn't matter, because I made some things only for testing the login. I guess when I clean up, that example will work as well. So thank you very much for your help and for this framework.
Marwan Rabbâa
@waghanza
Hi @greenlaw110,
do you plan to support java > 8 ?
Green Luo
@greenlaw110
@waghanza yes I do, but probably not in this year.
Marwan Rabbâa
@waghanza
@greenlaw110 I see that act use java 11 in https://travis-ci.org/github/actframework/actframework/builds/631822450#L204
however, you said to me in the past that act support only java 8. which jvm versions are supported ?
also java 17 (lts) is coming in september
Green Luo
@greenlaw110
@waghanza that travis build failed.
Understood that I need to catch up the new JDK, still need to figure out the time to work on it
Marwan Rabbâa
@waghanza
ok