Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add admin interface frontend #2478

Draft
wants to merge 2 commits into
base: v0.x.x
Choose a base branch
from

Conversation

Kang-Simon
Copy link

Draft the admin interface frontend.
(This commit contains a test virtual server)

@Kang-Simon
Copy link
Author

Kang-Simon commented Sep 10, 2021

You can run a virtual server and run the admin interface app independently to explore the screens.
The virtual server is designated as a build folder, so it can operate after running the build.
The virtual server execution method be npm run server
You can see it here [http://localhost:3200]

login
main

If it is confirmed with that version, we will change it to a commit from which the virtual server has been removed.

Draft the admin interface frontend
This commitment needs to be removed before merging
@codecov
Copy link

codecov bot commented Sep 10, 2021

Codecov Report

Merging #2478 (3221300) into v0.x.x (2e24d42) will decrease coverage by 0.29%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           v0.x.x    #2478      +/-   ##
==========================================
- Coverage   87.11%   86.82%   -0.30%     
==========================================
  Files         153      153              
  Lines       14824    14880      +56     
==========================================
+ Hits        12914    12919       +5     
- Misses       1910     1961      +51     
Flag Coverage Δ
integration 46.95% <ø> (-23.45%) ⬇️
unittests 86.61% <ø> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
source/agora/node/Registry.d 61.97% <0.00%> (-11.57%) ⬇️
source/agora/node/Config.d 71.31% <0.00%> (-7.32%) ⬇️
source/agora/test/LocalTransactions.d 86.36% <0.00%> (-4.55%) ⬇️
source/agora/test/Base.d 75.43% <0.00%> (-0.29%) ⬇️
source/agora/script/Engine.d 95.99% <0.00%> (-0.15%) ⬇️
source/agora/flash/Node.d 72.65% <0.00%> (-0.06%) ⬇️
source/agora/node/Runner.d 0.00% <0.00%> (ø)
source/agora/api/Registry.d 100.00% <0.00%> (ø)
source/agora/consensus/protocol/Nominator.d 87.99% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e24d42...3221300. Read the comment docs.

@linked0
Copy link
Contributor

linked0 commented Apr 14, 2022

Relates #3280
There are two things I'd like to request as I have completed analyzing the related code and requirements.
First, can we use HTTP basic authentication instead of the login endpoint like the following HTTP header?

Authentication: Basic <Encoded user/password pair>

It's because we have already implemented the basic authentication and it's simpler than login endpoint.
Second, can we change the method for the validator and encryption endpoints to GET method?


Admin 인터페이스에 대한 관련 코드와 요구사항 분석이 끝나고 나서 두가지 문의드릴 사항이 있는데 확인 부탁드립니다.
첫번째, login 엔드포인트대신 basic auth를 사용할 수 있을까요? (basic auth 사용방법). 이유는 basic auth가 이미 Agora에 구현되어 있는 상태이고, 그것을 사용하는게 훨씬 간단한 것 같습니다.
두번째, validatorencryption 엔드포인트에 대해서 POST대신 GET 방식을 사용해도 될 것 같은데요, 변경 가능한지 확인 부탁드립니다.

제가 자리에서 잠깐 설명 드리도록 하겠습니다.

@linked0
Copy link
Contributor

linked0 commented Apr 14, 2022

We, @Kang-Simon, and I decided to use the login endpoint for authenticate the admin but to remove the parameters for the endpoint and add the Authentication header for that. And we will use the GET method for all the endpoints.


@Kang-Simon 님과 논의 결과, login 엔트포인트는 그대로 유지하고, 아이디/패스워드 입력 파라미터 대신 Authentication를 사용하기로 했습니다. 그리고, 모든 endpoint에 대해서 GET 방식을 사용할 예정입니다.

@linked0
Copy link
Contributor

linked0 commented Apr 14, 2022

@Kang-Simon
한가지 추가로 확인 부탁드립니다. 기존에 구현되어 있는 AdminInterface 클래스를 최대한 활용하고자 하여 login 엔드포인트 스펙을 조금 수정하려고 합니다. 로그인 성공여부를, 데이터의 리턴 없이, 다음의 HTTP Status Code로 대신했으면 합니다.

200 : Success
401: Authentication Failed

모든 엔드포인트에 대해서 Basic Authentication가 적용되어 있어서, login만 따로 처리하기가 좀 어렵게 되어있는 점 양해부탁드립니다.

@Kang-Simon
Copy link
Author

@linked0
#2478 (comment)
아이디가 틀렸는지 패스워드가 틀렸는지 여부는 상관없이 무조건 통과 실패만 판단되는것입니까?

@linked0
Copy link
Contributor

linked0 commented Apr 14, 2022

@Kang-Simon
네, 어떤 것이 틀렸는지에 상관없이, 로그인 성공/실패만 구별하도록 하는 것입니다.

@linked0
Copy link
Contributor

linked0 commented Apr 18, 2022

@Kang-Simon 네, 어떤 것이 틀렸는지에 상관없이, 로그인 성공/실패만 구별하도록 하는 것입니다.

@Kang-Simon님, 원래 인터페이스 문서에 기술되어 있는대로, 아이디와 패스워드를 받아서 오류를 구별하여 리턴할 수 있는 방법을 찾아보도록 하겠습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants